React Router: IndexRoute

InstructorJoe Maddalone

Share this video with your friends

Send Tweet

IndexRoute allows us to define a default child component to be rendered at a specific route when no other sub-route is available.

sk29110
~ 8 years ago

After your change /about path should not be existed right?

kevin
~ 8 years ago

If you follow this video, and at the end click on the link created to go to about, rather than clicking the link for home, you will get a routing error. fyi, you need to add a Route for the about link to go to.

Michal Svorc
~ 7 years ago

<IndexRoute /> is no longer supported in react-router v4, try using <Switch /> instead