Javascript – How to get the current path, using react-router-dom
I need to get the location.pathname and compare it to the links to determine if the clicked anchor/sidebar item should be set to active or not (will become a red button if clicked). The topics should be active first, the…