I am new to React Router and learn that there are so many ways to redirect a page:
Using browserHistory.push(\"/path\")
browserHistory.push(\"/path\")
import
You can also use react router dom library useHistory;
` import { useHistory } from "react-router-dom"; function HomeButton() { let history = useHistory(); function handleClick() { history.push("/home"); } return ( Go home ); } `
https://reactrouter.com/web/api/Hooks/usehistory