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

Avoid creating new state references if unchanged #1063

Merged
merged 1 commit into from
Jun 8, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented Jun 7, 2017

Related: #916

This pull request seeks to improve Redux state behavior for keys handling post updates, to ensure that a new object reference is only returned if in-fact a change has occurred. The effect is two-fold: It avoids unnecessary re-renders by allowing react-redux's default pure render behavior to be effective, and may be used toward a goal of considering dirtiness as the presence of an undo history, since both combineUndoableReducers and combineReducers disregard unchanged state.

Testing instructions:

Ensure unit tests pass:

npm test

@aduth aduth added the Framework Issues related to broader framework topics, especially as it relates to javascript label Jun 7, 2017
Copy link
Contributor

@BE-Webdesign BE-Webdesign left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@aduth aduth merged commit e2d2c14 into master Jun 8, 2017
@aduth aduth deleted the update/avoid-state-updates branch June 8, 2017 12:30
@aduth
Copy link
Member Author

aduth commented Jun 8, 2017

Thanks @BE-Webdesign !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants