Nearby lessons
28 of 43🔗 React Router – Links & NavLink
📌 What are Router Links?
What are Links in React Router?
React Router provides Link and NavLink components
to navigate between pages without refreshing the browser.
They render as <a> tags in the DOM.
📌 Using <Link> in React Router
The Link component is used for client-side navigation.
Unlike <a> tags, it prevents page reloads and ensures
smooth navigation in a Single Page Application (SPA).
Example02
Loading editor…
✨ Using <NavLink> for Active Links
The NavLink component is an enhanced version of Link.
It adds an "active" class or allows inline style changes for the active route.
Useful for highlighting the current page in a navigation menu.
Example03
Loading editor…
🧠 Test Your Knowledge
3 QuestionsProgress: 0 / 3