question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React v16.13.0 - Field validation is triggering a "Warning: Cannot update a component from inside..."

See original GitHub issue

Subject 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

  1. Go to https://codesandbox.io/s/redux-form-simple-example-nn8nv
  2. Start typing in the input.
  3. 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:closed
  • Created 4 years ago
  • Reactions:63
  • Comments:56 (16 by maintainers)

github_iconTop GitHub Comments

19reactions
igodorogeacommented, Mar 20, 2020

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

18reactions
alex9110commented, Apr 3, 2020

Problem still exists. Updating to 16.13.1 did not help.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found