Hi 👋, is anyone having problems of composables losing internal state when navigated back to from another composable?
It didn't happen with the previous beta.
Kunal Raghav
05/20/2021, 9:38 AM
If somebody faces the same issue, pass a key to save the state by and it'll work again
Copy code
val (state, updateState) = rememberSaveable{ mutableStateOf("") }
Becomes
Copy code
val (state, updateState) = rememberSaveable(key="unique_save_key"){ mutableStateOf("") }