rerender on programmatic redirect react router code example
Example: how to use redirect in react
import { useHistory } from "react-router-dom";
function App() {
let history = useHistory();
}
import { useHistory } from "react-router-dom";
function App() {
let history = useHistory();
}