Last active
September 21, 2020 12:57
-
-
Save nomanr/681c96804a09ecd1405fabe77bbe359d 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
class ExampleFragment: Fragment(){ | |
val args by navArgs<ExampleFragmentArgs>() | |
//If we don't use Hilt, then create factory for each ViewModel and pass arguments | |
// Which is even worse | |
val viewModel by viewModels<ExampleViewModel> { | |
InjectorUtils.provideExampleViewModelFactory(args.argumentA, args.argumentB) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment