-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React 18: observer
not working with <React.StrictMode>
#3395
Closed
Labels
Comments
Should be fixed in mobx-react@7.5.1 |
Hey @urugator, can this be downported to v6 as well? I'm having this issue in my codebase and don't want to bump the version from 6 to 7 for compatibility issues. |
We generally don't port back across majors, that becomes too much of a
maintenance burden. I'd recommend to apply the changes locally instead
using patch-package, it's a really awesome tool for these kind of problems
…On Thu, 30 Jun 2022, 15:31 João Tonial, ***@***.***> wrote:
Hey @urugator <https://github.com/urugator>, can this be downported this
to v6 as well? I'm having this issue in my codebase and don't want to bump
the version from 6 to 7 for compatibility issues.
—
Reply to this email directly, view it on GitHub
<#3395 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBHHEIOJ4PZLPFAU6CTVRWVT7ANCNFSM5V2NNRDA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This was referenced Jul 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See #3393 (reply in thread) for explanation and fix proposal.
Discussed in #3393
Originally posted by acataluddi May 11, 2022
Hi guys,
I was wondering whether any of you experienced any issue with class-based React components and MobX when the
<React.StrictMode>
is enabled. I've created a quick CodeSandbox Example to explain the issue.There is a very basic MobX observable store and the following function which triggers the
enableService()
action:The strange thing is that while functional components get updated as expected (the first "service is enabled string) the class-based one is not (the green one):
However, by removing the
<React.StrictMode>
wrapper, everything works as expected:The same code was working without problems in older version of React even with the
<React.StrictMode>
enabled.Is it possible there is any bug or it's just me missing something obvious?
Thanks,
Adriano
The text was updated successfully, but these errors were encountered: