Answer the question
In order to leave comments, you need to log in
How to give parent div class active if Navlink has activeClassName?
I want to give parent div class active if Navlink has activeClassName
Answer the question
In order to leave comments, you need to log in
compare window.location.pathname with /dialogs/props.id and if the same, then add a class?
well, or something from React hooks, if there is no access to location.pathname, like this
https://reacttraining.com/react-router/core/api/Ho...
https://github.com/ReactTraining /react-router/blob...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question