Filip is correct, this fundamentally has nothing to do with compose. But in addition, you also don’t need
State
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).