vazco / uniforms

A React library for building forms from any schema.
https://uniforms.tools
MIT License
1.95k stars 240 forks source link

Compatibility with StrictMode #1324

Closed piotrpospiech closed 4 months ago

piotrpospiech commented 5 months ago

This fixes https://github.com/vazco/uniforms/issues/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.

codecov[bot] commented 5 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.