DevToolsMiddleware
class DevToolsMiddleware(config: DevToolsConfig, scope: CoroutineScope, stateSerializers: SerializersModule? = null)(source)
Middleware for connecting Reaktiv store to DevTools server.
This class is typically instantiated internally by DevToolsModule. Use DevToolsModule directly for the simplest setup:
val introspectionConfig = IntrospectionConfig(platform = "Android")
val sessionCapture = SessionCapture()
val store = createStore {
module(IntrospectionModule(introspectionConfig, sessionCapture))
module(DevToolsModule(
config = DevToolsConfig(
introspectionConfig = introspectionConfig,
serverUrl = "ws://192.168.1.100:8080/ws"
),
scope = lifecycleScope,
sessionCapture = sessionCapture
))
// ... other modules
}Content copied to clipboard
The middleware intercepts all actions and:
Handles DevToolsAction (Connect, Disconnect, Reconnect)
Broadcasts other actions to the DevTools server when connected
Parameters
config
DevTools configuration
scope
CoroutineScope for async operations
stateSerializers
Optional SerializersModule. If not provided, will use Store's serializers
Constructors
Link copied to clipboard
constructor(config: DevToolsConfig, scope: CoroutineScope, stateSerializers: SerializersModule? = null)