Google released AppState and it looks like a cleaner way to handle shared state than passing a SharedViewModel around. I never really liked SharedViewModel, felt like one screen ends up owning data other screens depend on it.
From what I get so far: StateStore is a shared observable value, MutableStateStore is the writable one, AppState owns the lifecycle, and transform lets you derive state automatically instead of syncing stuff by hand.
Curious what people think of the API so far.
Docs: https://developer.android.com/topic/libraries/architecture/appstate
Video: https://youtu.be/69QYEXymfVo
Anyone planning to try it out?
submitted by /u/Infamous_Sorbet4021[link] [comments]