Usehistory no se encuentra en React-Router-Dom

import { useNavigate } from 'react-router-dom';
const navigate = useNavigate();
navigate('/home');
Motionless Mole