-
-
Save mukeshsolanki/39c5e37b95fba0a7c6014ea1cd14d039 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 HelloWorld(): String { | |
Text("Hello") | |
Text("World") | |
return remember { "HelloWorld" } | |
} | |
// ✅ | |
@Composable | |
fun HelloWorld(modifier: Modifier = Modifier) { | |
Column(modifier = modifier) { | |
Text("Hello") | |
Text("World") | |
} | |
} | |
// ✅ | |
@Composable | |
fun rememberHelloWorld(): String { | |
return remember { "Hello World" } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment