Last active
March 3, 2022 10:11
-
-
Save Farhandroid/ecd9e9f0fc73d9157990bd851fd48155 to your computer and use it in GitHub Desktop.
MainContent
This file contains hidden or 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
private val viewModel = AppViewModel() | |
@Composable | |
fun MainContent(viewModel: AppViewModel) { | |
val title by viewModel.titleInputFlow.collectAsState() | |
Content(title = title, onTitleChange = { | |
viewModel.setTitle(it) | |
}, onResetClicked = { viewModel.resetTitle() }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment