-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Framework: createSelector: allow 2nd arg to be array of selectors #6391
Conversation
9cb4a4d
to
fecd425
Compare
cc @aduth for review :) |
I have doubts on whether the new tests are correctly described and whether they make sense, and whether it is confusing to have these two (old and new) with such similar descriptions:
|
In 5dc7d80 I have pushed a change to |
5dc7d80
to
885c677
Compare
I think they're fine. Potentially they could be collapsed into a single test, testing both that the memoization works as intended, and that the individual selectors in the I tweaked a few things in f25e3b5. If looks alright to you, I'm fine with merging this 👍 |
Props @lsinger and @aduth for contributions! This PR allows consumers of `createSelector` that depend on multiple selectors to simplify their invocation of `createSelector` from: createSelector( state => foo( state ) && bar( state ), state => [ foo( state ), bar( state ), baz( state ), ] ); to: createSelector( state => foo( state ) && bar( state ), [ foo, bar, baz ] );
f25e3b5
to
eb5793a
Compare
This PR allows consumers of
createSelector
that depend on multiple selectors to simplify their invocation ofcreateSelector
from:to:
To do
Test live: https://calypso.live/?branch=add/create-selector-dependants-array