Replies: 2 comments 3 replies
-
Is the only way to change value by using store in props like this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can use React context to share Mobx store between components, it's documented here: https://mobx.js.org/react-integration.html#using-external-state-in-observer-components For some reason, this information is hidden somewhere in docs, it's not easy to find and there is no way to create a link to a specific tab: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://codesandbox.io/s/react-mobx-change-value-in-several-components-f2tuu
How to change a variable from different places?
The variable is one, but it changes separately in different components and these changes made in one component are not reflected in the other.
Beta Was this translation helpful? Give feedback.
All reactions