Skip to content

Instantly share code, notes, and snippets.

@thearchetypee
Created April 23, 2023 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thearchetypee/b15aad3bacde5448b4abd18ed47eef6c to your computer and use it in GitHub Desktop.
Save thearchetypee/b15aad3bacde5448b4abd18ed47eef6c to your computer and use it in GitHub Desktop.
// 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