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
For FlowReduxStateMachine we should use StateFlow instead of Flow so that the StateMachine can work independent from it's state subscribers (like UI can subscribe and unsubscribe according to UI's lifecycle.
Furthemore, the statemachine should keep alive independent from subscribers lifecycle. Therefore a CoroutineScope should be passed as constructor parameter. That CoroutineScope will then be used to keep the whole statemachine alive until that scope gets canceled. On canceling this statemachine firther calls of dispatch() or state.collect() must throw an IllegalStateException.
The text was updated successfully, but these errors were encountered:
For
FlowReduxStateMachine
we should useStateFlow
instead of Flow so that the StateMachine can work independent from it's state subscribers (like UI can subscribe and unsubscribe according to UI's lifecycle.Furthemore, the statemachine should keep alive independent from subscribers lifecycle. Therefore a CoroutineScope should be passed as constructor parameter. That CoroutineScope will then be used to keep the whole statemachine alive until that scope gets canceled. On canceling this statemachine firther calls of
dispatch()
orstate.collect()
must throw anIllegalStateException
.The text was updated successfully, but these errors were encountered: