Is it possible that that mutableStateOf doesn't ca...
# compose
Is it possible that that mutableStateOf doesn't cause recomposition. I have a flaky test and it looks like that recomposition is not happening sometimes and I can't find out why. (code is in the thread)
I tried to describe problem in the following gist
Basically, the state is changed. I have verified it with logs, but it is not propagated to the Content composable which doesn't change and that cause failing test. I never happened on real device. It happens sometimes on the emulator. Basically I click on the button, change the state, the state is changed but recomposition is not happening sometimes.
ScreenState is enum so there shouldn't be a problem with comparing different values. I changed it to the boolean but it didn't work either.
@martinsumera I'm wondering if you need to call .value on the state inside your snapshotFlow function
Copy code
snapshotFlow { viewModel.viewState.screenState.value }.collect {
    Log($it) // This prints correct value
Nope, it was mistake during copy-pasting of the code