Different mobx store instances in react-native app #2577
Unanswered
Gabotron-ES
asked this question in
Q&A
Replies: 1 comment
-
I don't understand your question. You have a singleton instance of GlobalStore and that means only one instance of everything will exist. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
in my react-native I use mobx for state management single source of truth, app is made of multiple mobx stores, I want to set it so that stores can communicate between them using custom hook useStore.
My question is if I will be keeping the same instance of the stores, afaik if I have multiple instances of mobx stores I'll have problem debugging state...
Inside a store I can call another store (spinnerStore from postStore for example):
In my components (via useStore() hook
index.js
GlobalStore.js
and last piece, useStore hook
Beta Was this translation helpful? Give feedback.
All reactions