When I mutate some `State`, can I reason about whe...
# compose
u
When I mutate some
State
, can I reason about when will the recomposition happen? (Immediately, Next frame etc) Is the only contract "eventually"?
u
> Compose’s apply observer notes what changed and then requests a new frame (if it hasn't already) and schedules the real work to happen when that frame starts to get produced (see so..next frame? (It's bit too dense for me right now)
v
I don't think there is a "next frame" guarantee. So, it's likely "eventually"
1
s
In most cases, the next frame is correct, might be two in some cases, but guaranteed with the next recomposition
u
Is it guaranteed to not be on the sooner than that?
s
that only happens if you mutate the state in composition
thank you color 1