React v16.13.0 - Field validation is triggering a "Warning: Cannot update a component from inside..."
See original GitHub issueSubject of the issue
After React update to v16.13.0 Field
validation is triggering
Warning: Cannot update a component from inside the function body of a different component.
on initialize and on input.
Steps to reproduce
- Go to https://codesandbox.io/s/redux-form-simple-example-nn8nv
- Start typing in the input.
- Warning appears in console.
Other information
React v16.13.0 changes https://reactjs.org/blog/2020/02/26/react-v16.13.0.html#warnings-for-some-updates-during-render
Issue Analytics
- State:
- Created 4 years ago
- Reactions:63
- Comments:56 (16 by maintainers)
Top Results From Across the Web
redux-form warning Cannot update a component from inside ...
After entering or deleting values from input field I get a red warning in the console. If I comment out the validate prop...
Read more >React v16.13.0 – React Blog
Warning : Cannot update a component from inside the function body of a different component. This warning will help you find application bugs ......
Read more >How To Handle DOM and Window Events with React
In React apps, you can use event handlers to update state data, trigger ... including a self-validating input component and an informative ...
Read more >FAQs | React Hook Form - Simple React forms validation
You can't use Hooks inside of a class component, but you can definitely mix classes and function components with Hooks in a single...
Read more >cannot update a component while rendering a different ...
This warning was introduced since React V16.3.0. If you are using functional components you could wrap the setState call into useEffect.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can confirm that when using
react@16.13.1
the warning is not showed anymore.Here is the proof: https://codesandbox.io/s/redux-form-simple-example-f447i
Problem still exists. Updating to 16.13.1 did not help.