I am new to react-router and I just started writing an app using react-router V4. I would like to to pass props to components rendered by
and I am w
You must use the render
prop instead of component
to pass on custom props, otherwise only default Route props are passed ({match, location, history}
).
I pass my props to the Router and child components like so.
class App extends Component {
render() {
const {another} = this.props
return
}
}
const Routes = (props) =>
}/>
...
}/>