Hi! I have a bunch of fragments, each with their o...
# koin
o
Hi! I have a bunch of fragments, each with their own viewmodel, that will act as a ‘wizard’/‘workflow’ with multiple states. I have used the Tinder StateMachine library for state implementation. Could someone please point me in the right direction for state sharing between fragments/viewmodels? I figure I have to write a KOIN shared viewmodel, but I am not sure I have understood the full picture and need a tip… Thanks!
p
sharedViewModel
perfectly matches single-Activity approach, you can use
LiveData
or
BehaviorRelay
to share state between fragments