-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INITIALIZE action is called twice when initialValues is presented #3690
Comments
Here are some working examples illustrating the issue: |
Hi, I am having the same issue. The redux form called @@redux-form/INITIALIZE 2 times. |
I could confirm this introduced in 7.2, not happening in 7.1.2. Thanks for the killer library!!! |
Published fix in |
I'm still having the same issue with v7.2.2. |
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. |
Are you submitting a bug report or a feature request?
Bug introduced by #3615
What is the current behavior?
INITIALIZE
action is called twice wheninitialValues
prop is used. This behaviour can cause problems with reinitializing props for the second time after values could be already changed (incomponentWillMount
of children of the form).What is the expected behavior?
Call
INITIALIZE
once.Do not call for the second time in
componentDidMount
or handle properlyinitialized
inthis.initIfNeeded
, which isfalse
after the first initialization incomponentWillMount
.What's your environment?
Redux Form 7.2.0
Other information
Bug was introduced in https://github.com/erikras/redux-form/releases/tag/v7.2.0 in bug fix called "Fixed hot reloading problem with React 16" #3615
The text was updated successfully, but these errors were encountered: