Also, what are the practical differences (if any) between using
SnapshotStateList
and
Flow<List<T>>.collectAsState
?
z
Zach Klippenstein (he/him) [MOD]
10/13/2021, 12:51 AM
To change the latter, you need to copy the whole list. You can mutate the former in place.
e
eygraber
10/13/2021, 3:40 AM
Interesting, I wasn't even considering that angle.
From a compose standpoint, does
SnapshotStateList
allow for more granular recomposition?
z
Zach Klippenstein (he/him) [MOD]
10/13/2021, 2:06 PM
I don't think so. It's effectively just a persistent immutable list stored in a mutable state, so all reads on the list are considered equal in terms of change notifications.