Answers for "route on reactjs"

17

react js router

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

react router

// npm install react-router-dom
// yarn add react-router-dom
import {
  BrowserRouter as Router,
  Switch,
  Route,
  Link
} from "react-router-dom";
Posted by: Guest on September-11-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
1

router react

npm install -g create-react-app
create-react-app demo-app
cd demo-app
Posted by: Guest on February-03-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language