I'm playing around with an "alternative" way to retain state across screen transitions, config changes and so on. So far I'm basically mimicking the `ViewModelStore `class (basically a
HashMap
tied to the activity lifetime that survives configuration changes), so I can cache arbitrary objects.
I believe it is much better than having `ViewModel`s because this approach lets me create the models I need in 100% compose.
This is no rocket science, however I couldn't find any thread or post about this, so there must be something bad. Can someone enlighten me?
ste
10/14/2022, 7:25 PM
Context: I'm currently using
rememberSaveable
and
SaveableStateHolder
. However, the user can trigger a
TransactionTooLargeException
if he navigates through the app for a while and then leaves the app, and I feel like that hashmap is the less painful and quickest solution to implement
d
dewildte
10/18/2022, 4:24 PM
I am pretty sure @jw has some opinions on this kind of thing ☝️