J
J
Jedi2018-08-22 14:41:31
React
Jedi, 2018-08-22 14:41:31

How to get current route from React Router?

Good afternoon!
Can you please tell me how can I get the current route from the child component?

- index.js
-- App.js
--- Menu.js

How can I Menu.jsget the current route? I'm using react-router-dom.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-08-22
@PHPjedi

Use withRouter .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question