Skip to content

Instantly share code, notes, and snippets.

@Farhandroid
Last active March 3, 2022 10:11
Show Gist options
  • Save Farhandroid/ecd9e9f0fc73d9157990bd851fd48155 to your computer and use it in GitHub Desktop.
Save Farhandroid/ecd9e9f0fc73d9157990bd851fd48155 to your computer and use it in GitHub Desktop.
MainContent
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