Answers for "react route app"

17

react js router

npm install react-router-dom
Posted by: Guest on November-18-2019
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