Answers for "router components in react"

1

router components in react

import { BrowserRouter, Route, Link } from "react-router-dom";
 <Router>
      <Route component={Navbar} />
      <Switch>
        <Route exact path="/" component={Home} />
        <Route exact path="/login" component={Login} />
        <Route
          exact
          path="/email-verify"
          component={() => <EmailVerification token={TokenValue} />}
        />
        <Route component={() => <h3 className="text-center">Error 404</h3>} />
      </Switch>
    </Router>
Posted by: Guest on September-15-2021
0

route in component react

import { BrowserRouter, Route, Link } from "react-router-dom";
Posted by: Guest on November-22-2020

Code answers related to "router components in react"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language