mvflow / net.pedroloureiro.mvflow / MVFlowWithEffects

MVFlowWithEffects

interface MVFlowWithEffects<State, Action, Effect> : MVFlow<State, Action> (source)

Extension of MVFlow to be used together with a HandlerWithEffects.

This interface allows you to observe the external effects.

Parameters

State - a class that holds all information about the current state represented in this MVFlow object.

Action - a class that represents all the interactions that can happen inside this view and associated information.

Effect - a class that represents things that you might need to handle outside the handler that deals with UI actions. Typically used for navigation and one-off events that do not mutate the state.

Functions

observeEffects

Observe external effects emitted by the handler.

abstract fun observeEffects(): Flow<Effect>