redirection in functional component in react 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();
}