rememberMobiusLoopLocal
A Mobius Loop lifecycle handler bound to a Composable function.
The loop will be started immediately with startModel and disposed of when removed from Composition.
To restore state from a previous loop instance, use a storage mechanism the platform provides to persist the model instance, then read it into startModel.
Create the loop outside the main Composable UI function. You should provide the model and event consumer function as parameters to maintain preview support. The loop setup would typically live at the same level as your navigation handler body for the associated route.
Return
An object holding the State<M> and Consumer<E>, destructure in that order.
Parameters
The Model with which the Mobius Loop will run
The Event type accepted by the loop
The Effect type handled by the loop
The initial model used when starting the loop.
The Init function to use when starting the loop
A lambda which produces the loop builder to use.
See also
For improved Android support from common UI code.