I\'m trying to pass props from my app.jsx to one of my route components using react router but I get the following error
TypeError: Cannot read property \
Here are few ways you can pass props to a route component.
With the react-router v5, we can create routes by wrapping with a
component, so that we can easily pass props to the desired component like this.
Similarly, you can use the children prop in v5.
} />
If you are using react-router v4, you can pass it using the render prop.
} />
(originally posted at https://reactgo.com/react-router-pass-props/)