java.lang.IllegalStateException when using State in Android Jetpack Compose

Three ways this can be resolved are

    1. To call the method in a launched effect block in your composable
    1. Or set the Context to Dispatchers.Main when setting value of the mutableState using withContext(Dispatchers.Main)
    1. Or change the mutable state in viewModel to mutableState flow and use collectAsState() in composable to collect it as a state.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)