DEV Community

Cover image for Types of routings in react js
Dezina
Dezina

Posted on

Types of routings in react js

  1. window.location = /jobCandidates/${jobId}?candId=${candidateId}
  2. import { Redirect } from 'react-router';
  1. {candidate.name}
  2. props.history.push("/forgotpassword", { userId: user.username });
  3. Define the routes first in App.js import { Router , Route, Switch } from "react-router-dom";

class App extends Component {
render() {
return (




exact />


    </div>
  </Router >
);

}
}

Top comments (0)