Answers for "react route dome"

38

react route

npm install react-router-dom
Posted by: Guest on February-03-2020
1

React route

let routes = (
 <BrowserRouter>
      <Navbar />
      <div className="container mt-2" style={{ marginTop: 40 }}>
        <Switch>
          <Route exact path="/">
            <Home />
          </Route>
          <Route path="/about">
            <About />
          </Route>
        </Switch>
      </div>
    </BrowserRouter>
);
Posted by: Guest on May-23-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language