-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Compatibility with StrictMode #1324
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1324 +/- ##
==========================================
- Coverage 94.55% 94.43% -0.13%
==========================================
Files 231 231
Lines 3823 3827 +4
Branches 1030 1035 +5
==========================================
- Hits 3615 3614 -1
Misses 82 82
- Partials 126 131 +5 ☔ View full report in Codecov by Sentry. |
hi @piotrpospiech @zendranm thanks for this fix! wondering if there are plans to patch it in version 3? |
Hi @mdesousa, we didn't consider it. Our focus is on version 4, which is nearly finished (v4.0 Milestone) and mainly needs documentation updates. We don't plan more changes to v3 packages. If this fix is important for you, I'd recommend trying the v4 beta or waiting for the full v4 release coming soon. |
@piotrpospiech unfortunately our app is in production and can't upgrade to a beta library yet. We'd also expect that there will be breaking changes and more testing necessary to upgrade to 4.0... which we'll happily do when it's ready. But in the meantime getting this small patch for version 3 would help us with this issue that is impacting our production app. Thanks! |
This fixes #1194.
Overriding
setState
caused this issue. I removed it and added checking if the component is mounted before callingsetState
.Tested with Vite, React
v18.2.0
and Strict Mode.