How do you get the routing context, location, parameters, etc. when using withRouter () ?
import { withRouter } from 'react-router'; const SomeComponent = ({location, route, params}) => ( <h1>The current location is {location.pathname}</h1> ); const ComposedWithRouter = withRouter(SomeComponent);
Can you get this information using withRouter, or should these things be explicitly passed through the component tree?
reactjs react-router
Tabbyofjudah
source share