browserrouter as router code example
Example 1: route in component react
import { BrowserRouter, Route, Link } from "react-router-dom";
Example 2: browserrouter
<BrowserRouter
basename={optionalString}
forceRefresh={optionalBool}
getUserConfirmation={optionalFunc}
keyLength={optionalNumber}
>
<App />
</BrowserRouter>