-
Notifications
You must be signed in to change notification settings - Fork 13
Tips & tricks
diklimchuk edited this page Jan 26, 2021
·
1 revision
- How to reuse the code in Reducer?
Create a function inside of the Reducer, or add a property into the State body.
- How to map State data?
There's no alague for example for ViewModel in MviCore yet, but you can add a property to the State body.
- Why there's no Subscriptions, like in the usual ELM?
There's a simpler way. To subscribe to data changes, you can a Command when handling an init Event.
- How is screen state restored?
In a plain implementation, state is restored after sending an init Event inside onCreate which triggers a call to render. To handle more complex cases read Handling configuration change and process death