Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Router 4 Basics Getting Started with React Router Inline Rendering with <Route>

Ryli Davis
.a{fill-rule:evenodd;}techdegree seal-36
Ryli Davis
Full Stack JavaScript Techdegree Graduate 15,136 Points

UPDATED react-router-dom v6: render={ () => DOES NOT WORK. Fixed it by adding title to element={<About title='About' />}

I was getting the following error:

Matched leaf route at location "/about" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.

because of this line of code:

<Route path="/about" render={ () => <About title='About' /> } />

I fixed it by using the following code:

<Route path="/about" element={<About title='About' /> } />