onBroadcast

inline fun <A : Any> onBroadcast(noinline transform: (model: Any, action: A) -> Any)

Registers a broadcast handler for action A that runs once per installed model. transform receives each model instance and returns its (possibly unchanged) replacement. Use for cross-cutting actions such as reset/logout that every model must observe. The transform must be pure: it must not call dispatch or read the store, only compute the next model from its inputs.