Sitemap
Abdul Rahman Badmus

Abdul Rahman Badmus

React Router Dom

1 min readNov 30, 2023

The primary functionality of react-router-dom is implementing dynamic routing in web applications. Based on the platform and the requirements of the application, react-router-dom supports component-based routing, which is the ideal solution for routing if the React application is running on the browser.

PAGE NAVIGATION

Navigation to the new page happens without a page refresh and loss of state. If you want to navigate between pages in your React single page app, you start by setting up React Router.

LINK COMPONENT

Get Abdul Rahman Badmus’s stories in your inbox

Join Medium for free to get updates from this writer.

This means that things like right-clicking a Link work as you’d expect.

NAV LINK

The NavLink component in React Router is used for navigation. The NavLink renders as a tag when loaded on the DOM.

REDIRECTING

React Router Redirect is a routing component in React Router Dom that enables us to override the history object and dynamically redirect a user from a route to a new route.

--

--