You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Florian Schuster edited this page Mar 23, 2025
·
6 revisions
An EffectController is a Controller that additionally provides a Flow of Effect which represent a one-shot UI notification such as a Toast or a Snackbar on Android.
interfaceEffectController<Action, State, Effect> : Controller<Action, State> {
val effects:Flow<Effect>
}
The effectsFlow is received in a fan-out fashion, which means one emission can be collected by one collector only.
When creating an EffectController via CoroutineScope.createEffectController, Effects can be emitted from within Mutation-, Reducer- and all Transformer-contexts via emitEffect(Effect)