Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels