Skip to content
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

Merged
merged 2 commits into from
May 24, 2024
Merged

Compatibility with StrictMode #1324

merged 2 commits into from
May 24, 2024

Conversation

piotrpospiech
Copy link
Collaborator

This fixes #1194.

Overriding setState caused this issue. I removed it and added checking if the component is mounted before calling setState.

Tested with Vite, React v18.2.0 and Strict Mode.

@piotrpospiech piotrpospiech added this to the v4.0 milestone Apr 20, 2024
@piotrpospiech piotrpospiech self-assigned this Apr 20, 2024
@github-actions github-actions bot added the Area: Core Affects the uniforms package label Apr 20, 2024
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 94.43%. Comparing base (4b3f109) to head (e76fe3d).

Files Patch % Lines
packages/uniforms/src/BaseForm.tsx 58.33% 0 Missing and 5 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

kestarumper

This comment was marked as resolved.

@piotrpospiech piotrpospiech merged commit e7d7785 into master May 24, 2024
5 of 7 checks passed
@piotrpospiech piotrpospiech deleted the fix-strict-mode branch May 24, 2024 07:26
@mdesousa
Copy link

mdesousa commented Dec 5, 2024

hi @piotrpospiech @zendranm thanks for this fix! wondering if there are plans to patch it in version 3?

@piotrpospiech
Copy link
Collaborator Author

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.

@mdesousa
Copy link

mdesousa commented Dec 6, 2024

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Affects the uniforms package
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Compatibility with StrictMode
4 participants