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

Have combineReducers return same object if nothing changes #856

Merged

Conversation

aaronjensen
Copy link
Contributor

Fixes #853

const initialState = reducer(undefined, '@@INIT');
expect(reducer(initialState, { type: 'FOO' })).toBe(initialState);
});

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to see more tests.
We need to check that:

  • With several reducers, having just one return something different is enough to cause inequality
  • With several reducers, having all return the same is enough to maintain equality

@aaronjensen aaronjensen force-pushed the combine-reducers-reference-equality branch from 07dd1b0 to 6b8a4a8 Compare October 7, 2015 16:24
@aaronjensen
Copy link
Contributor Author

@gaearon I believe I've addressed your feedback, please let me know if there is anything else. Thanks!

gaearon added a commit that referenced this pull request Oct 7, 2015
…quality

Have combineReducers return same object if nothing changes
@gaearon gaearon merged commit 2cd6b2b into reduxjs:master Oct 7, 2015
@gaearon
Copy link
Contributor

gaearon commented Oct 7, 2015

This is good to go, thanks.

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.

2 participants