Search
 
SCRIPT & CODE EXAMPLE
 

HTML

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')
Comment

usehistory is not exported from react-router-dom

In react-router-dom V6 useHistory() is replaced by useNavigate()

you can use:

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

PREVIOUS NEXT
Code Example
Html :: android location access 
Html :: upload svg to wordpress 
Html :: onclick function link to another html page 
Html :: href phone number 
Html :: page html exemple 
Html :: table two columns html 
Html :: nuxt link relative path 
Html :: add manifist to html 
Html :: html input date validation 
Html :: how to use select2 
Html :: how to make text big on big screens and smaller and smaller screen html 
Html :: multiple choice checkbox html 
Html :: new line html 
Html :: regular expression to look for html tags 
Html :: yes no checkbox css 
Html :: html ideas 
Html :: angular input onchange 
Html :: html highlight text 
Html :: svg with src in html 
Html :: ngForm 
Html :: input type text click button 
Html :: html date range input 
Html :: placeholder wpf 
Html :: ignore text html elemnt 
Html :: tailwind css navbar 
Html :: Meta Tag Generato - SEO 
Html :: how to make a file downloadable in html 
Html :: lato google fonts 
Html :: html video 
Html :: how to add an html anchor 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =