Skip to content

Instantly share code, notes, and snippets.

@victorbrndls
Created October 19, 2021 12:21
Show Gist options
  • Save victorbrndls/f355a7614112a50d13b669ed7f16c65a to your computer and use it in GitHub Desktop.
Save victorbrndls/f355a7614112a50d13b669ed7f16c65a to your computer and use it in GitHub Desktop.
@HiltViewModel
class ExampleViewModel @Inject constructor(
...
) : ViewModel() { /* ... */ }
@AndroidEntryPoint
class ExampleActivity : AppCompatActivity()
@Composable
fun ExampleScreen(
exampleViewModel: ExampleViewModel = viewModel()
) { /* ... */ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment