Skip to content

Instantly share code, notes, and snippets.

@gpeal
Last active February 4, 2021 17:17
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 gpeal/f665e20e5d89d5a76ce87fa16383e973 to your computer and use it in GitHub Desktop.
Save gpeal/f665e20e5d89d5a76ce87fa16383e973 to your computer and use it in GitHub Desktop.
@Composable
fun MyComposable() {
val viewModel: MyViewModel = mavericksViewModel()
val state by viewModel.collectAsState()
AnotherComposable(
state.value,
onClick = viewModel.onClick()
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment