“Bereaksi Router Dom” Kode Jawaban

react-router-dom

$ npm install --save react-router-dom
Enthusiastic Elephant

Bereaksi 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
husseinpenart

Jawaban yang mirip dengan “Bereaksi Router Dom”

Pertanyaan yang mirip dengan “Bereaksi Router Dom”

Lebih banyak jawaban terkait untuk “Bereaksi Router Dom” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya