I have a router like below:
Works for me in the same way:
... ... ...
And then, I can access "this.props.location.pathname" in the MyComponent function.
I forgot that it was I am...))) Following link describes more for make navigation bar etc.: react router this.props.location