I'm really interested in Compose, but I currently ...
# compose
z
I'm really interested in Compose, but I currently represent all my data (model) as immutable data. I use
Flow<T>
for this. Every instance of
T
is immutable all the way down, which has a bunch of advantages.
@Model
seems to require use of
var
👍 1
Does Compose support fully immutable data?
l
You can setup an observable to your flow and save a
mutable state
which get updated everytime your immutable data emits
j
Yes, Compose loves immutable data We provided
@Model
for people who's applications are already designed for mutable data or otherwise find it hard to work with immutable data. If you are already using immutable data, great!
🙏 5