egghead.io_idiomatic_redux_course_notes icon indicating copy to clipboard operation
egghead.io_idiomatic_redux_course_notes copied to clipboard

08-Using_withRouter_to_Inject (mapStateToProps using react-route v4)

Open doriclaudino opened this issue 6 years ago • 1 comments

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'),
});

doriclaudino avatar May 31 '18 14:05 doriclaudino

If this work, then create pull request, if it is not working then write what is wrong.

senpl avatar Oct 25 '18 10:10 senpl