louiscad
06/25/2020, 1:07 PMZach Klippenstein (he/him) [MOD]
06/25/2020, 1:15 PMsavedInstanceState
function - what else do you need?louiscad
06/25/2020, 1:16 PMZach Klippenstein (he/him) [MOD]
06/25/2020, 1:18 PMstate
and replace state
with savedInstanceState
.louiscad
06/25/2020, 1:19 PMZach Klippenstein (he/him) [MOD]
06/25/2020, 1:21 PMRestorationManager
in this doc roughly corresponds to UiSavedStateRegistry
, RestorationId
to whatever key is used for savedInstanceState
(the positional memoization key by default), and RestorationScope
to the ambient that holds the UiSavedStateRegistry
.Adam Powell
06/25/2020, 1:23 PMPath("key") { }
nesting that I think roughly parallels the nested bucket approach described herelouiscad
06/25/2020, 1:26 PMAdam Powell
06/25/2020, 1:27 PMZach Klippenstein (he/him) [MOD]
06/25/2020, 1:30 PMsavedInstanceState
. You'd have to explicitly call that function instead of magically swapping it in, but it seems like the behavior would be different enough anyway (what Adam said, two way syncing?, Etc) that the opt-in would be safer.State
from non-compose code yet? Once that's available, you could build something like this on top of that with some coroutines and something like Store.louiscad
06/25/2020, 1:34 PMsavedInstanceState
substitute (which might involve a suspending logic, and "linking" to an error handling logic)
2. Explicitedness about the actual key use for saving some data, to allow long term storage (i.e. not limited to the app version), without conflicts
For merging, I was thinking it'd be something to handle in the logic of the savedInstanceState
substitude.Adam Powell
06/25/2020, 1:36 PMAndrey Kulikov
06/25/2020, 5:11 PMUiSavedStateRegistry
with an ambient where you can do your own saving and restoration as it is nicely abstractedlouiscad
06/25/2020, 5:16 PMUiSavedStateRegistry
?Andrey Kulikov
06/25/2020, 5:32 PMlouiscad
06/25/2020, 5:45 PMZach Klippenstein (he/him) [MOD]
06/25/2020, 6:31 PM