handle

open fun <A> handle(execute: suspend (D, A) -> D): SimpleHandler<A>

Factory method to create a SimpleHandler mapping the actual value of the Store and a given Action to a new value.

Parameters

execute

lambda that is executed whenever a new action-value appears on the connected event-Flow.


open fun handle(execute: suspend (D) -> D): SimpleHandler<Unit>

Factory method to create a SimpleHandler that does not take an Action

Parameters

execute

lambda that is executed for each event on the connected Flow