Hey! Im using Koin `v.3.1` and I have some issue w...
# koin
l
Hey! Im using Koin
v.3.1
and I have some issue with the injection of the
SavedStateHandle
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
do you pass your state with parametersOf
?
l
Euh nope, here the injection code
Copy code
private val articleViewModel: ArticleViewModel by stateViewModel()
a
for the state, in 3.1.x, you have a
state
parameter inside
stateViewModel.
You can pass a function that return your bundle