The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

React Router: Route Parameters

React Router: Route Parameters

2:20
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.
Watch this lesson now
Avatar
egghead.io

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.

Avatar
Tom

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

Avatar
Joel

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.

In reply to Tom
Avatar
David Weiss

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

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?