MiddlewareScope

A scope for a Middleware.

Do not implement this interface directly. New methods or properties might be added to this interface in the future.

Properties

Link copied to clipboard
abstract val coroutineScope: CoroutineScope

The CoroutineScope of the Store.

Link copied to clipboard
abstract val state: State

The current state of the Store.

Functions

Link copied to clipboard
abstract fun dispatch(action: Action)

Dispatches an action. It is the same as calling Store.dispatch.

Link copied to clipboard
abstract fun next(action: Action): State

Calls the next middleware function in the chain, or the real Store.dispatch function if the middleware is the last in the chain.