Hopefully this is a simple question that I'm just having trouble phrasing.
Prior to using react-router:
My app is structured in a way that there is a list of items, clicking an item sets a
You need to pass location/pathname/params explicitly as props to child components.
react-router currently provides
context.router which will help you navigate forward and backward but it doesn't give you the details of the current route. In earlier versions, there used to be
context.router.getCurrentRoutes but they were both deprecated in v2.0.0-rc4.
Changed context exports
Only an object named
routeris added to context. Accessing
context.routeare all deprecated.
this.props.locationof your route component. If you'd like to get it deeper in the tree, you can use whatever conventions your app has for getting props from high down low. One option is to put it context yourself