React-router-dom
$ npm install --save react-router-dom
Enthusiastic Elephant
$ npm install --save react-router-dom
//first install react router
npm install react-router-dom
//or
yarn add react-router-dom
///then write your code like in below in your App js or index.js
import {BrowserRouter , Routes , Route} from 'react-router-dom'
<BrowserRouter>
<Routes>
<Route exact path='/' element={<Home/>} />
<Route exact path='/login' element={<Login/>} />
<Route exact path='/signup' element={<Signup/>} />
</Routes>
</BrowserRouter>
//and now your down if you get error try to close your editor and open it again then you are good to go