Route component react router code example
Example 1: router react
npm install react-router-dom
Example 2: route in component react
import { BrowserRouter, Route, Link } from "react-router-dom";
npm install react-router-dom
import { BrowserRouter, Route, Link } from "react-router-dom";