Composable Function

rememberUpdatedState

remember a mutableStateOf newValue and update its value to newValue on each recomposition of the rememberUpdatedState call.

rememberUpdatedStateSampleWithDisposableEffect

@Suppress("UnnecessaryLambdaCreation")
@Sampled
fun rememberUpdatedStateSampleWithDisposableEffect() {

rememberUpdatedStateSampleWithLaunchedEffect

@Sampled
fun rememberUpdatedStateSampleWithLaunchedEffect() {
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: