SimpleHandler

class SimpleHandler<A>(collect: (Flow<A>, Job) -> Unit) : Handler<A>

Defines, how to handle actions in your Store. Each Handler accepts actions of a defined type. If your handler just needs the current value of the Store and no action, use Unit.

Parameters

collect

defines how to handle the values of the connected Flow

Constructors

SimpleHandler
Link copied to clipboard
js
fun <A> SimpleHandler(collect: (Flow<A>, Job) -> Unit)
defines how to handle the values of the connected Flow

Functions

invoke
Link copied to clipboard
js
open operator fun invoke()
Calls this handler exactly once.
open operator fun invoke(data: A)
Calls this handler exactly once.

Properties

collect
Link copied to clipboard
js
open override val collect: (Flow<A>, Job) -> Unit
defines how to handle the values of the connected Flow