Passing Props Down To React-Router Route
Last updated
Was this helpful?
Last updated
Was this helpful?
When using , you'll often use the component
prop to have a certain component rendered.
If, however, you need to pass props down into MyComponent
, then you'll want to use the render
prop with an inline function.
The two spread operator statements are essential. They will pass down the that Route
would have passed down plus the additional set of props that you want to pass down.