React Router

Image description

When it comes to building modern web applications React Router, is the way to go for it's a client side routing library that handles navigation between views or pages in React without reloading the page! A new React Router version V7.3.0 came out March 6th, 2025.

Why use React Router?

  • Great Navigation no page reloading for better UX.
  • Dynamic Routing great for dynamic parameters and query string easily.
  • Nested Routing create structured layouts with subroutes.

Lets get set up
Install the React Router package.

npm install react-router-dom@latest

Now wrap the entire app with in the index.js

import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import App from "./App";

ReactDOM.render(
  
    
  ,
  document.getElementById("root")
);

This makes client side routing for your app.

**All routes are now in a  container**