Is there a good pattern for exposing a mutablestat...
# compose
g
Is there a good pattern for exposing a mutablestatelist from an object (eg, a paginator) to the UI, but not exposing the modify methods? eg; object retains mutablestatelist, UI sees statelist. Casting it in a get function would break the state updates, no?
z
Expose it as a List
SnapshotStateList implements List
g
The UI updates will still work even though the state stops before it hits compose?
Oh cool that does work, I really didn't think that'd work since compose wouldn't have a state list anymore. How does that work internally then that something like a LazyColumn is still aware of the state changes, is it just re-casting it back to a state list?
z
Doesn’t need to
g
Oh cool I've been looking for some reading on how the snapshotting works, thanks!
z
There’s a bunch of posts in that series that you might find interesting then
❤️ 1