Zach Klippenstein (he/him) [MOD]

11/11/2019, 8:28 PM
Is there anyway to write to/read from the saved instance state from a Compose function - like some kind of ambient or something that provides hooks for that?
👍 1

Ryan Mentley

11/11/2019, 9:22 PM
Not currently. There's not exactly a single saved instance state - `View`s have their own, `Fragment`s have their own, `Activity`s have their own... you could easily create the `Ambient`s yourself and wrap your content in them (or just pass it in as a parameter, depending on what you're doing).
(for reading)
we want to do something to make this easier
solution TBD though

Adam Powell

11/11/2019, 9:30 PM
It's likely going to be based on the incoming ViewModel/SavedStateHandle stuff coming into arch components
👍 1
☝️ 1
At least under the hood