React-Router : What is the purpose of IndexRoute?
In the top example, going to /
would render App
with Home
passed as a child. In the bottom example, going to /
would render App
with neither Home
nor About
being rendered, since neither of their paths match.
For older versions of React Router, more information is available on associated version's Index Routes and Index Links page. Starting in version 4.0, React Router no longer uses the IndexRoute
abstraction to achieve the same goal.