-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing a MutableState inside a coroutine seemingly leads to skipped emissions #249
Comments
… emissions Repro of issue submitted at: cashapp/molecule#249
… emissions Repro of issue submitted at: cashapp/molecule#249
@JakeWharton any idea about that? |
The immediate clock is a best-effort tool: we can trigger recomposition when the state is dirtied, but it is not possible to guarantee that a recomposition will occur each time the state is dirtied. Honestly, that |
Adding a
Makes it emit 3 items too. Are you confident it is a limitation of |
Speaking as someone who wrote |
I'm incrementing an initially 0
MutableState<Int>
twice in a row:myPresenter()
emits [0,1,2].Is this a bug or working as intended?
And if it is WAI, how come? I naively thought that in both cases I should expect my presenter to emit [0,1,2].
(running Kotlin 1.8.21, kotlinx.coroutines 1.7.1, compose-runtime 1.4.3, molecule 0.9.0, turbine 0.13.0)
The text was updated successfully, but these errors were encountered: