myanmarking
01/19/2022, 12:44 PMFilip Wiesner
01/19/2022, 12:51 PMZach Klippenstein (he/him) [MOD]
01/19/2022, 1:29 PMState
objects for lambdas to see updates. If you’re updating properties on an object captured by a lambda, that lambda will see the updated properties of the object when it asks for them.
That said, if you’re writing the state updates from a composition, you should definitely be using snapshot state objects – not because LaunchedEffect
, or lambda capture in general, requires them, but because updating non-snapshot-state objects from a composition is considered a “side effect” in the general sense, and has all the same issues as performing any side effect from a composition (e.g. side effects from discarded compositions look like they come from nowhere).