npm install react-router-dom
react-router-dom provides several components, but the most important one is , which you'll wrap around your application. This component uses HTML5 history API to keep your UI in sync with the URL.
You define routes using the component. Each component checks the current location’s pathname and renders the corresponding component if the path matches. You can specify paths using path prop and the component to render using component prop.
Instead of traditional anchor tags (), you'll use component from react-router-dom to navigate between different routes in your application. It prevents full page reloads and provides a smoother user experience.