Skip to content

Instantly share code, notes, and snippets.

@Skyyo
Created October 2, 2022 14:45
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 Skyyo/0102da1158cfa4868870ee37312690b0 to your computer and use it in GitHub Desktop.
Save Skyyo/0102da1158cfa4868870ee37312690b0 to your computer and use it in GitHub Desktop.
perf_snippet_13
@Composable
fun StateReadsInlinedComposablesScreen() {
var count by remember { mutableStateOf(0) }
WrappedColumn {
Text(text = "count: $count")
Button(onClick = { count++ }) {
Text(text = "increase count")
}
}
}
@Composable
fun WrappedColumn(content: @Composable ColumnScope.() -> Unit) {
Column(content = content)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment