Replies: 1 comment 1 reply
-
Hi @BrianHung! Do you think you could include a minimal, reproducible example in e.g. a CodeSandbox? It's difficult to say what might go wrong without seeing some real code. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How does one pass an observable / computed array or map into
useCallback
? Mobx docs say to useobservable
to wrap components and or convert observable into plain objects. However, usingobservable
doesn't work when trying to use mobx data with a third-party react library that I don't control.The particular library I'm using indirectly takes mobx data via
useCallback
.As a hack, I'm using
JSON.stringify
to trigger MST to re-render. Is there a more mobx-native way to trigger a read within a reactuseCallback
?Beta Was this translation helpful? Give feedback.
All reactions