Last active
May 17, 2023 16:43
-
-
Save saqib-github-commits/68ed2737a1e3e9dd465a09b2518c6293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun DisposableEffectTestScreen( | |
viewModel: DisposableEffectTestViewModel | |
) { | |
val count = viewModel.count.collectAsState() | |
DisposableEffect(count.value) { | |
println("DisposableEffect block called for count = ${count.value}") | |
onDispose { | |
println("onDispose Called") | |
} | |
} | |
// compose content | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment