React Router Dom 6 Revenez en arrière

import { useNavigate } from "react-router-dom";
const navigate = useNavigate();
navigate(-1);
CodePadding