Skip to content

This project demonstrates routing in React using the react-router-dom library. It includes a navigation bar with links to Home, About, and Contact pages, where each page is rendered dynamically based on the selected route. The active link in the navigation menu is highlighted to indicate the current page.

Notifications You must be signed in to change notification settings

PuneethKumarMS/React_Routing_Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

React Routing Application

This project demonstrates routing in React using the react-router-dom library.
It includes a navigation bar with links to Home, About, and Contact pages, where each page is rendered dynamically based on the selected route.
The active link in the navigation menu is highlighted to indicate the current page.


πŸš€ Features

  • Navigation menu with active link highlighting
  • Separate components for:
    • Home
    • About
    • Contact
  • Implemented using:
    • BrowserRouter
    • Routes
    • Route
    • NavLink

πŸ› οΈ Technologies Used

  • React
  • react-router-dom
  • CSS (for styling)

πŸ“‚ Project Structure

react-routing-app/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html
β”‚   └── favicon.ico
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Home.jsx
β”‚   β”‚   β”œβ”€β”€ About.jsx
β”‚   β”‚   β”œβ”€β”€ Contact.jsx
β”‚   β”‚   └── Navbar.jsx
β”‚   β”œβ”€β”€ App.jsx
β”‚   β”œβ”€β”€ style.css
β”‚   └── main.jsx
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js
└── README.md

πŸ“¦ Installation & Usage

# 1️⃣ Create a new React project using Vite
npm create vite@latest react-routing-app -- --template react

# 2️⃣ Navigate into the project folder
cd react-routing-app

# 3️⃣ Install dependencies
npm install

# 4️⃣ Install React Router
npm install react-router-dom

# 5️⃣ Start the development server
npm run dev

About

This project demonstrates routing in React using the react-router-dom library. It includes a navigation bar with links to Home, About, and Contact pages, where each page is rendered dynamically based on the selected route. The active link in the navigation menu is highlighted to indicate the current page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published