React Router: Route Parameters

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
~ 9 years ago

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

Joel Hooks
Joel Hooks
~ 9 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
~ 8 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