showing results for - "react router last page"
Miguel Ángel
01 Sep 2018
1import { useHistory } from "react-router-dom";
2
3function demo () {
4    let history = useHistory();
5    const goToPreviousPath = () => {
6        history.goBack()
7    }
8    return (
9      <div>
10        <Button
11          onClick={goToPreviousPath}
12        >
13          Back
14        </Button>
15      </div>
16    ):
17}