Skip to content

Routing in react

Course: PayTM project - chapter 15

Import react-router-dom into your project and add the following routes -

  1. /signup - The signup page
  2. /signin - The signin page
  3. /dashboard - Balances and see other users on the platform.
  4. /send - Send money to other users
Solution
function App() {
return (
<>
<BrowserRouter>
<Routes>
<Route path="/signup" element={<Signup />} />
<Route path="/signin" element={<Signin />} />
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/send" element={<SendMoney />} />
</Routes>
</BrowserRouter>
</>
)
}