in my ViewModel
When my viewmodel is called for the first time in my Fragment, I received a new SavedStateHandle and not the one I see from the Fragment
Does anyone have an idea
Here’s the code:
VM
Copy code
class ArticleViewModel(
private val savedStateHandle: SavedStateHandle,
private val useCase: ArticleUseCase) : ViewModel() {
AppModule
Copy code
viewModel { ArticleViewModel(get(), get()) }
a
arnaud.giuliani
07/02/2021, 7:52 AM
do you pass your state with parametersOf
arnaud.giuliani
07/02/2021, 7:52 AM
?
l
LG
07/02/2021, 12:07 PM
Euh nope, here the injection code
Copy code
private val articleViewModel: ArticleViewModel by stateViewModel()