Last active
May 13, 2024 22:44
-
-
Save CostaFot/c148649eb01494d4929ac6549bb8d2c7 to your computer and use it in GitHub Desktop.
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
@Composable | |
fun FirstScreen( | |
navigate: () -> Unit, | |
firstContainer: FirstContainer = rememberFirstContainer(), | |
firstViewModel: FirstViewModel = viewModel(factory = firstContainer.viewModelFactory) | |
) { // content here.. } | |
@Composable | |
fun rememberFirstContainer(): FirstContainer { | |
return remember { | |
FirstContainer().also { | |
DaggerFirstComponent.builder().build().inject(it) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment