compose-selectors
v0.0.2
Published
Utility to reduce boilerplate code while using selectors together with Redux mapStateToProps
Downloads
2
Maintainers
Readme
Compose Selectors
Helper function that reduces boilerplate code needed while using selectors alongside connect function.
connect((state) => ({
firstTodo: getFirstTodo(state),
todoCount: getTodoCount(state),
currentUser: getCurrentUser(state),
notifications: getNotifications(state)
}))
Can be replaced with:
connect(composeSelectors({
firstTodo: getFirstTodo,
todoCount: getTodoCount,
currentUser: getCurrentUser,
notifications: getNotifications
}))