Normally when you click '<a' tag it causes browser to navigate.
But if you use <NavLink or other components like it they are rendered as '<a' tags.
<NavLink
So why doesn't the browser navigate to the href of those a tags?
Is it because there is an event listener on a tag using prevent default or returning false?
When it navigates
<a href="/home">
In this case, href value is url. But in NavLink
<a href="#home"> <div id="home"></div>
In this case, href value is id of DOM element.
2.1m questions
2.1m answers
60 comments
57.0k users