Answers for "useHistory is not exported form react-router-dom"

1

useHistory is not exported form react-router-dom

In react-router-dom version 6 
useHistory() is replaced by useNavigate() ;

import {useNavigate} from 'react-router-dom';
const navigate = useNavigate();
navigate('/home')
Posted by: Guest on November-09-2020

Code answers related to "useHistory is not exported form react-router-dom"

Code answers related to "Javascript"

Browse Popular Code Answers by Language