Is there anyway to write to/read from the saved in...
# compose
z
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
r
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
a
It's likely going to be based on the incoming ViewModel/SavedStateHandle stuff coming into arch components
👍 1
☝️ 1
At least under the hood