Skip to content
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

Remove UNSAFE_componentWillMount and fix initialValues not passed to validation #4741

Merged
merged 3 commits into from Dec 22, 2022

Conversation

sanex3339
Copy link
Contributor

@sanex3339 sanex3339 commented Jul 19, 2021

Remove UNSAFE_componentWillMount and fix initialValues not passed to validation.

Issues: #4628, #4642
Partially ported from shanshanzhu@d59ea8e

Updated React development version to 17.0.2

tkachalov added 3 commits July 19, 2021 14:24
…validation.

Issues: redux-form#4628, redux-form#4642
Ported from shanshanzhu@d59ea8e

Updated React development version to 17.0.2
…eateField.js

Replaced UNSAFE_componentWillMount on componentDidMount in reduxForm.spec.js
@sanex3339
Copy link
Contributor Author

sanex3339 commented Jul 19, 2021

@erikras hi, as we discussed, please check this.
Still 4 UNSAFE lifecycle methods are left, i'm not sure how to rewrite them, tests are failing.

@sanex3339 sanex3339 mentioned this pull request Jul 19, 2021
@Cetlan
Copy link

Cetlan commented Jul 19, 2021

Maybe outside the scope of this fix, but to be (perhaps a bit too) blunt, the problem here is #4020 It might have fixed a bug with the wrong values being passed in under one particular set of conditions - but completely broke the behaviour of initial setup, where previously the values prop was set up to be the intialValues when first set up, and now it's set up to be an empty object because the initialization logic was inverted without account for the reason it was written that was in the first place.

So, validation not getting initialValues is just the symptom that everyone has started to notice about that change, but anything that relies on values could be broken. I won't pretend to know enough of the redux-form code to know if your fix is general enough to account for that, but as I spent days trying to understand why upgrading redux-form broke the application I'm working with, I figured I'd make note of the more general possible problem since you're working on it.

@sanex3339
Copy link
Contributor Author

@shanshanzhu please check this too, because it based in your changes

@shanshanzhu
Copy link
Contributor

@sanex3339 LGTM

@dominikduda
Copy link

Is there any ETA of when will this be released?

@jaketrimble
Copy link

Checking in on an ETA for release. Thanks!

@vladkosinov
Copy link

vladkosinov commented Nov 12, 2021

@erikras @iamandrewluca is there a chance this PR or #4728 will be merged?

@sbaechler
Copy link

This would also fix parts of #4373 and #3954

@kimyu92
Copy link

kimyu92 commented Nov 30, 2022

@erikras May you review this PR to enable React 17 support to prevent it falling behind too far especially React 18 has been out for a few months? 🙏

@gaievskyi
Copy link

@erikras UP 🙏

@erikras erikras merged commit 3d6fdc5 into redux-form:master Dec 22, 2022
@sanex3339
Copy link
Contributor Author

👍

@haradakunihiko
Copy link
Contributor

@erikras May I ask when this will be released? I am eagerly awaiting this fix.

@erikras
Copy link
Member

erikras commented Mar 28, 2023

Published in v8.3.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet