React Router: Route Parameters

Joe Maddalone
InstructorJoe Maddalone

Share this video with your friends

Send Tweet

A router library is no good if we have to hardcode every single route in our application. In this lesson we look at how to access variables in our routes and pass them into our components.

Tom
Tom
~ 5 years ago

Looks like the new version of React Router changes props.params to props.routeParams

Joel Hooks
Joel Hooks
~ 5 years ago

Looks like the new version of React Router changes props.params to props.routeParams

Thanks for the heads up Tom, we will look into that.

David Weiss
David Weiss
~ 4 years ago

Ouch, my brain hurts! ;-) In react router a route parameter allows us to pass in a portion of our route path as a property of our component that we’re gonna render at that path