We now explore how to hook up menus, toolbars, and how to trigger navigation events with
I would like to say thank you for this course because this pattern gives me a headache when I'm seeing examples and how much code is needed to be implemented. Nice and clear step by step introduction!
Anyway I was wondering about one topic which is notorious for Android devs. How would you like to handle process death (save & restore) scenario for MVI states? Is there any chance for additional course video?
Thank you for that, really happy to hear the course was helpful this way. :)
It's a great question, and I think it would indeed make for a great follow up episode. For now, here's a quick outline on how to survive process-death:
The core idea is to create an Application level component whose job will be to save the
ModelStore(s) state. Then, that same component can initialize your
ModelStore(s) on App restart. This will allow you to survive process death. One more thing, typically a user dismissing the app from the recent apps list might expect a full reset. So when re-launching an App from scratch, you might want to clear any previously stored
There's a multitude of ways to save your state. If you don't feel inspired to write your own, I'd suggest taking a look like Square's
Tape library: https://github.com/square/tape
Hope this helps!