Hi. What's the best practice of saving the Backsta...
# ballast
a
Hi. What's the best practice of saving the Backstack state, so I can restore it on the next launch? Or not recommended?
c
Backstack state restoration is officially supported and encouraged, there’s a section in the More Navigation FAQs on it.
Note that the SavedStateAdapter in the docs is just something I threw together now. If you’re only using the
RouterContract.Inputs
for navigation, it should work just fine, but I haven’t really tested it very thoroughly with the undo/redo module, so it may not work perfectly with that and might need some tweaking to ensure the two interceptors play together nicely like I expect they should.
You could also extend the logic to handle things like initializing the navigation hierarchy from a deep-link, for example
a
What about navigation arguments?
c
All navigation arguments are part of the URLs (query parameters) and would be persisted with the path, nothing special needs to be done there