egghead.io_idiomatic_redux_course_notes
egghead.io_idiomatic_redux_course_notes copied to clipboard
08-Using_withRouter_to_Inject (mapStateToProps using react-route v4)
08-Using_withRouter_to_Inject_the_Params_into_Connected_Components.md
VisibleTodoList.js
After (react-router v4.0.0 or superior)
const mapStateToProps = (state, withRouterParams) => ({
todos: getVisibleTodos(
state.todos,
withRouterParams.match.params.filter || 'all'),
});
If this work, then create pull request, if it is not working then write what is wrong.