Skip to content

Instantly share code, notes, and snippets.

@mukeshsolanki
Created May 1, 2022 12:55
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 mukeshsolanki/4fd52873505e86c30d3546c957233651 to your computer and use it in GitHub Desktop.
Save mukeshsolanki/4fd52873505e86c30d3546c957233651 to your computer and use it in GitHub Desktop.
// ❌
@Composable
fun HelloWorld() {
Text("Hello")
Text("World")
}
// ✅
@Composable
fun HelloWorld(modifier: Modifier = Modifier) {
Column(modifier = modifier) {
Text("Hello")
Text("World")
}
}
// ✅
@Composable
fun ColumnScope.HelloWorld() {
Text("Hello")
Text("World")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment