react router dom
import React from "react";
import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";
// This site has 3 pages, all of which are rendered
// dynamically in the browser (not server rendered).
//
// Although the page does not ever refresh, notice how
// React Router keeps the URL up to date as you navigate
// through the site. This preserves the browser history,
// making sure things like the back button and bookmarks
// work properly.
export default function BasicExample() {
return (
{/*
A
looks through all its children
elements and renders the first one whose path
matches the current URL. Use a any time
you have multiple routes, but you want only one
of them to render at a time
*/}
);
}
// You can think of these components as "pages"
// in your app.
function Home() {
return (
Home
);
}
function About() {
return (
About
);
}
function Dashboard() {
return (
Dashboard
);
}