Created
April 23, 2023 08:47
-
-
Save thearchetypee/b15aad3bacde5448b4abd18ed47eef6c 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
// Launched Effect | |
private var i = 0 | |
@Composable | |
fun SideEffect() { | |
var text by remember { | |
mutableStateOF("") | |
} | |
LaunchedEffect(key1 = text) { | |
i++ | |
} | |
Column { | |
Button(onClick = { text += "@" }) { | |
Text(text) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment