Package 

Class MVIViewModel

  • All Implemented Interfaces:
    pro.respawn.flowmvi.MVIProvider , pro.respawn.flowmvi.ReducerScope

    
    public abstract class MVIViewModel<S extends MVIState, I extends MVIIntent, A extends MVIAction>
    extends ViewModel implements ReducerScope<S, I, A>, MVIProvider<S, I, A>
                        

    A ViewModel that uses MVIStore internally to provide a convenient base class. Only functions of the MVIProvider are made public, everything else happens through intents and actions. Exposing other public functions / streams is discouraged. You can inject this view model into the MVIView.provider field. If you want to add error handling for reduce, override recover (default implementation throws immediately)