You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that it would be very convenient to accept an object as a valid mapStateToProps argument. In which case, each function inside it would be assumed to be a Redux selector.
I always use reselect and I would love to be able to do:
connect({
foo: fooSelector,
bar: barSelector,
})
instead of doing the verbose:
connect(createStructuredSelector({
foo: fooSelector,
bar: barSelector,
})
I know that this is just sugar, but I think that it would be very convenient. In the same way that I love the fact that I can pass an object with action-creators as a valid mapDispatchToProps argument, I would like to be able to pass an object with selectors in the mapStateToProps argument.
The text was updated successfully, but these errors were encountered:
This has been brought up quite a few times. There's already an open PR with a possible implementation over in #323 , although progress on it seems to have stalled. I'll close this as a dupe, since that PR would cover this.
Uh oh!
There was an error while loading. Please reload this page.
I think that it would be very convenient to accept an object as a valid
mapStateToProps
argument. In which case, each function inside it would be assumed to be a Redux selector.I always use reselect and I would love to be able to do:
instead of doing the verbose:
I know that this is just sugar, but I think that it would be very convenient. In the same way that I love the fact that I can pass an object with action-creators as a valid
mapDispatchToProps
argument, I would like to be able to pass an object with selectors in themapStateToProps
argument.The text was updated successfully, but these errors were encountered: