Conditionally set active class on menu using react router current route

Posted by Andre Scott | Updated on

Conditionally set active class on menu using react router current route. It doesn’t look like you’re passing the prop into the correct element. The children of App would be whatever child route is being rendered (so either Home or Triangles), but you want the prop to be passed to Menu.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers