subscribe
A function to subscribe to the store that follows the system lifecycle.
This function will assign the store a new subscriber when invoked, then populate the returned State with new states.
Provided consume parameter will be used to consume actions that come from the store.
Store's subscribers will not wait until the store is launched when they subscribe to the store. Such subscribers will not receive state updates or actions. Don't forget to launch the store.
Return
the State that contains the current state.
Parameters
the subscription mode that should be reached in order to subscribe to the store. At specified moments in the UI lifecycle (Activity, Composable, Window etc), the store will subscribe and unsubscribe from the store.
a lambda to consume actions with.
See also
A function to subscribe to the store that follows the system lifecycle.
This function will assign the store a new subscriber when invoked, then populate the returned State with new states.
Store's subscribers will not wait until the store is launched when they subscribe to the store. Such subscribers will not receive state updates or actions. Don't forget to launch the store.
Return
the State that contains the current state.
Parameters
the subscription mode that should be reached in order to subscribe to the store. At specified moments in the UI lifecycle (Activity, Composable, Window etc), the store will subscribe and unsubscribe from the store.
See also
Subscribe to the store lifecycle-aware.
Parameters
called on each new action. Implement action handling here.
called each time the state changes. Render state here.
the minimum lifecycle state the LifecycleOwner must be in to receive updates.
See also
Subscribe to the store lifecycle-aware.
Parameters
called each time the state changes. Render state here.
the minimum lifecycle state the LifecycleOwner must be in to receive updates.
See also
Subscribe to the store lifecycle-aware.
Parameters
the minimum lifecycle state the LifecycleOwner must be in to receive updates.
See also
Subscribe to the store lifecycle-aware. This function will not collect the store's actions.
Parameters
the minimum lifecycle state the LifecycleOwner must be in to receive updates.