Confused about when to apply observer in React #3374
Unanswered
PieterBoeren
asked this question in
Q&A
Replies: 1 comment 6 replies
-
The ESLint rule is just a recommendation, it is not mandatory. Wrapping all the components with |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm a bit confused on when to apply
observer
for a React component, the documentation states:which I interpret as "components which don't read observable data, shouldn't be wrapped" (and is working fine).
However the next paragraph states:
and the ESLint plugin for MobX gives warning for this.
Should every component be wrapped with
observer
, or only the ones which really read observable data (and thus basically turn off the ESLint rule)?Beta Was this translation helpful? Give feedback.
All reactions