React Router: How to add child routes

For react router 4 and above

Avery Duffin
ITNEXT
Published in
2 min readJul 9, 2019

--

Photo by Ergyn Meshekran on Unsplash

Hopefully by now you are familiar with react. But one of the most important things when building your single page web apps is understanding routing. Lucky for us react has made routing really easy.

When you first start writing react apps you probably started with a bunch of these:

const NewComponent =…

--

--

Writer for

Im a software engineer, react developer, inventor, salesman, family man, religious, and outdoor connoisseur