You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that I need to use one ViewModel instance in two screens using one ViewModelStore from NestedNavigatorScreen. But since following the documentation each screen has its own ViewModelStore I can't create or get the same ViewModel using the ViewModelStore from the current screen.
DI I used: Koin
IN SHORT: how to make shared viewmodel with common ViewModelStoreOwner from NestedNavigatorScreen
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone. I ran into the problem of using a shared viewmodel. I have a screen with nested navigation and here is it:
The problem is that I need to use one
ViewModel
instance in two screens using oneViewModelStore
fromNestedNavigatorScreen
. But since following the documentation each screen has its ownViewModelStore
I can't create or get the same ViewModel using theViewModelStore
from the current screen.DI I used: Koin
IN SHORT: how to make shared viewmodel with common ViewModelStoreOwner from NestedNavigatorScreen
Beta Was this translation helpful? Give feedback.
All reactions