<@U0KMMQA20> in your post you say &gt; The only t...
# compose
j
@Zach Klippenstein (he/him) [MOD] in your post you say
The only time a read can't happen is when reading a
StateObject
that was initialized after the current snapshot was created. If you've ever gotten an
IllegalStateException
with the message "Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied", that might be why (although in practice it usually means a bug in Compose itself, not your code)
https://dev.to/zachklipp/implementing-snapshot-aware-data-structures-3pi8 A year later, do you still agree w/ the statement "although in practice it usually means a bug in Compose itself, not your code" ?
I'm hitting this after we bumped to composeUi 1.2 , compose runtime 1.2.1, and compose compiler 1.3.0
i
If you’re not manipulating snapshots directly, I’d still agree with his statement. There is a bug fix in progress for one cause of this https://android-review.googlesource.com/c/platform/frameworks/support/+/2210216/
j
Thanks for getting back to me! This is great to know it's being worked on.