Replies: 3 comments 9 replies
-
With functional components you should use |
Beta Was this translation helpful? Give feedback.
1 reply
-
Dunno if we actually support this, but we do pass the second arg: mobx/packages/mobx-react-lite/src/observer.ts Lines 56 to 58 in 17997c2 Note the observer implicitly uses memo , so IIRC it may prevent propagation of context changes.Can you setup a codesandbox repro? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm trying to reference context (legacy API) from a functional component (https://reactjs.org/docs/legacy-context.html#referencing-context-in-stateless-function-components), which wrapped with
observer
. Something like this:Why after wrapping the component with
observer
, context is unexpected empty object? How should I do in order to get it correctly?Beta Was this translation helpful? Give feedback.
All reactions