xxfast
12/14/2021, 12:30 PMgetStateViewModel
is @Deprecated
. How would one inject a view model in a @Composable
with a SavedStateHandle
passed through the params?xxfast
12/14/2021, 12:42 PMgetViewModel()
does seem to return a handle. My mistake was that I was using kotlin’s destructuring before
viewModel { (handle: SavedStateHandle) -> LoginViewModel(handle) }
and had to replace with
viewModel { params -> LoginViewModel(handle = params.get()) }
arnaud.giuliani
12/14/2021, 5:21 PMarnaud.giuliani
12/14/2021, 5:21 PM