If you’re using 1.0 or newer, you have the location as a prop in your React components that are matched against a route. So you just type
this.props.location.pathname
to get what you wanted.
If you’re using 1.0 or newer, you have the location as a prop in your React components that are matched against a route. So you just type
this.props.location.pathname
to get what you wanted.