Answers for "reacte router"

17

react js router

npm install react-router-dom
Posted by: Guest on November-18-2019
29

router react

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

react router

import ReactDOM from "react-dom";
import { Route, BrowserRouter as Router, Switch } from "react-router-dom";
const routing = (
  <Router>
    <React.StrictMode>
      <Header />
      <Switch>
        <Route exact path="/" component={Register} />
        <Route exact path="/Login" component={Login} />
        <Route exact path="/Home" component={App} />
        <Route path="/Logout" component={Logout} />
        <Route path="/CreatePost" component={CreatePost} />
        <Route path="/CreateComment" component={CreateComment} />
        <Route path="/UserProfile" component={UserProfile} />
        <Route path="/SearchProfile" component={SearchedProfile} />
        <Route path="/follow" component={FollowDisplay} />
        <Route path="/following" component={FollowingDisplay} />
      </Switch>
      <Footer />
    </React.StrictMode>
  </Router>
);
Posted by: Guest on October-02-2021
0

react router

import {
  BrowserRouter,
  Switch,
  Route,
  Link,
  useRouteMatch,
  useParams
} from "react-router-dom";
ReactDOM.render(
  <BrowserRouter>
    <React.StrictMode>

      <Switch>
        <Route exact path="/" component={React_chat_app} />
		<Route exact path='/:topicId' component={component0}/>

        <Route exact path="/your-url" component={component1} />

        <Route  component={component2} />

      </Switch>



    </React.StrictMode></BrowserRouter>,
  document.getElementById('demo')
);
Posted by: Guest on June-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language