how to insatll react-router-dom
$ npm install react-router-dom
how to insatll react-router-dom
$ npm install react-router-dom
how to use elements of 'react-router-dom'
import React from 'react'
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'
import '../styles/global.css'
import Layout from '../containers/Layout'
import Home from '../pages/Home'
import Login from '../containers/Login'
import RecoveryPassword from '../containers/RecoveryPassword'
import NotFound from '../pages/NotFound'
const App = () => {
return (
<Router>
<Layout>
<Routes>
<Route exact path="/" element={<Home/>}/>
<Route exact path="/login" element={<Login/>}/>
<Route exact path="/recovery-password" element={<RecoveryPassword/>}/>
<Route path="*" element={<NotFound/>}/>
</Routes>
</Layout>
</Router>
);
}
export default App;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us