This is a React + Vite project that demonstrates the use of React Router for navigation. It shows how we can create a layout and can just change the main component with using Outlet. We don't need to call header and footer on each page component. We also learn the use of useParams() to allows you to access URL parameters inside a React component.
- React – Core library
- React Router – For navigation
- Tailwind – For UI
git clone https://github.com/Kunal1101/react-router
cd react-routernpm installnpm startThe app will run at http://localhost:3000/.
Feel free to fork this repo and submit pull requests! 🎉