redux-form: React v16.13.0 - Field validation is triggering a "Warning: Cannot update a component from inside..."
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
- 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
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 63
- Comments: 56 (16 by maintainers)
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.
I can confirm this is happening for me as well, here’s a list of my versions:
Same problem with react 16.13.1 and 0.63.3 RN + expo
I confirm not having this warning anymore with
react@16.13.1
I have this warning in react-native, there is no react-dom package in yarn.lock
I also confirm that 🎉
I’m having the same issue with
initialValue
andvalidation
. Good to hear @iamandrewluca is looking into thisMy advise is to delete
react-hot-loader
from your project. It’s a huge hack and you’re essentially running a different build of React than the one we ship. No guarantees around how that one works.If you want hot reloading, look into this plugin as alternative. We’re planning to make it an official integration soon once a few more issues are worked out.
I also confirm that 🎉
Note it doesn’t “revert this warning”, it only reduces the cases in which it fires.
@esetnik Hi, for me it is reproducible with two requirements: the presence of initialValues and validate function. May be it will be useful:
It is safe.
I’ll take some time next week to investigate the problem.
If the warning bothers you, you can save react as a exact verion (
"16.12.0"
) right now.I am also using this with react-native and getting same error. Anyone have proper solution?
I can confirm that I have this same warning message with the below configuration:
It seems that everything works but the message is irritating
Recently updated to Expo SDK 39, which brought React 16.13.1 with it, and I’m encountering this issue. It doesn’t appear to affect anything but it’s highly annoying to have an error pop up where I want to tap every time any render happens.
Updating to 16.13.1 both, React and the Dom, did not help. I’am getting the same problem.
Thanks. i confirm too! i was going crazy with the warnings! but updating to @16.13.1 solved my issues
Still waiting for a solution
still seeing this on validate and normalize, even with react 16.13.1
I think we have enough confirmations. 😃 There’s no need to post more.
Still having this problem too.
@alex9110, don’t forget to update react-dom to 16.13.1
React team today released https://github.com/facebook/react/releases/tag/v16.13.1 that reverts this warning
Can someone confirm that warning is not showed when using
react@16.13.1
?