The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Redux: Filtering Redux State with React Router Params

Redux: Filtering Redux State with React Router Params

4:09
We will learn how adding React Router shifts the balance of responsibilities, and how the components can use both at the same time.
Watch this lesson now
Avatar
egghead.io

We will learn how adding React Router shifts the balance of responsibilities, and how the components can use both at the same time.

Avatar
Michael

If we were using a selector to handle the filtering logic in getVisibleTodos, how could the value from params.filter be made accessible to the selector?

In reply to egghead.io
Avatar
Dan Abramov

We pass it to the selector from the component as the second argument.

In reply to Michael
Avatar
Darrell

It was distracting to suddenly hear about webpackDevMiddleware, Express, etc. with no explanation, no introduction, no links, etc. Broke the nice progression of the tutorial.

Avatar
Omri Mor

For those who are using React-Router v4 in their projects the syntax for an optional param is placing a '?' after the param name. For example:

<Route path="/:filter?" component={TodoApp}/>

http://stackoverflow.com/questions/35604617/react-router-with-optional-path-parameter

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?