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

Use a cached object for syncErrors and syncWarnings #4010

Merged
merged 1 commit into from May 1, 2018
Merged

Use a cached object for syncErrors and syncWarnings #4010

merged 1 commit into from May 1, 2018

Conversation

sf-old
Copy link
Contributor

@sf-old sf-old commented Apr 27, 2018

It appears that #3201 introduced a regression where a prop that was cached to the same value when falling back (#3072) now creates a new object each render. This can cause a rendering performance penalty hit due to preventing shallow prop comparisons.

This PR fixes the regression by always using the empty property from the plain structure, rather than from the structure being passed as an argument to createReduxForm (which I believe was the intended fix in #3201).

Copy link
Collaborator

@gustavohenke gustavohenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It LGTM, but I rather have @erikras views on it before merging

@erikras erikras merged commit 23b1fbd into redux-form:master May 1, 2018
@erikras
Copy link
Member

erikras commented May 1, 2018

Yep. Fine because of the immutable way we edit those values. 👍

@lock
Copy link

lock bot commented Jun 1, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2018
@erikras
Copy link
Member

erikras commented Jun 12, 2018

Released in v7.4.0.

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

Successfully merging this pull request may close these issues.

None yet

4 participants