Skip to content

Silent initial field registration to avoid React warning#766

Merged
erikras merged 1 commit into
masterfrom
silent-initial-field-registration
Mar 30, 2020
Merged

Silent initial field registration to avoid React warning#766
erikras merged 1 commit into
masterfrom
silent-initial-field-registration

Conversation

@erikras

@erikras erikras commented Mar 30, 2020

Copy link
Copy Markdown
Member

As of React v16.13.0, there has been a warning. In v16.13.1, they pointed it directly to https://fb.me/setstate-in-render (react/react#18178 (comment)).

This PR fixes the problem by using a new feature in [email protected] that allows "silent" field registration that does not notify everyone else. Interestingly, this should also be a performance improvement for adding new fields.

Fixes #751.

@codecov

codecov Bot commented Mar 30, 2020

Copy link
Copy Markdown

Codecov Report

Merging #766 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #766   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          251       251           
  Branches        58        58           
=========================================
  Hits           251       251           
Impacted Files Coverage Δ
src/useField.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a617789...4dda676. Read the comment docs.

@erikras
erikras merged commit b27d119 into master Mar 30, 2020
@erikras
erikras deleted the silent-initial-field-registration branch March 30, 2020 19:51
@erikras

erikras commented Mar 30, 2020

Copy link
Copy Markdown
Member Author

Published in v6.4.0.

@lock

lock Bot commented May 5, 2020

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning: Cannot update a component from inside the function body of a different component.

1 participant