Hi. Question. I have a pretty simple Composable li...
# compose-web
j
Hi. Question. I have a pretty simple Composable like this:
Copy code
@Composable
fun UploadBox() {
    var loadingState by mutableStateOf(false)

    if (loadingState) {
        Progress()
    } else {
        Content() // this is simplified, it is a big composable that contains a button
    }
}
The The content has a button that on click, it sets
loadingState = true
, performs an action in a coroutine
CoroutineScope.launch
, then toggles it back to
false
. For some reason the
UploadBox
does not seem to recompose and show the
Progress
while the state is
true
. It always goes to the
else
branch. The action on click is done using the
CoroutineScope
obtained via
rememberCoroutineScope()
. Not sure what's happening here
Wtf, nvm 🙈 I forgot
remember
Having no linters complaining totally got me. Too used to the Android Compose UX 😄