Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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
Javascript :: enable select jquery 
Javascript :: noconflict jquery 
Javascript :: golang convert json string to map 
Javascript :: string to number js 
Javascript :: prime factorization javascript 
Javascript :: move list items up and down using javascript 
Javascript :: mongodb create index unique 
Javascript :: check for substring javascript 
Javascript :: jquery validation on button click 
Javascript :: Handlebars: Access has been denied to resolve the property 
Javascript :: copy an array without pointer in angular 
Javascript :: error: listen eaddrinuse: address already in use 0.0.0.0:5555 
Javascript :: check if element has childs jquery 
Javascript :: terminate execution in jquery 
Javascript :: remove multiple values from array javascript 
Javascript :: how to iterate table rows in javascript 
Javascript :: react-native loading screen 
Javascript :: usehistory 
Javascript :: import jqueery vanilla js 
Javascript :: js download json 
Javascript :: sweet alert 2 do action on confirm 
Javascript :: Require cycle: node_modules n-fetch-blobindex.js - node_modules n-fetch-blobpolyfillindex.js - node_modules n-fetch-blobpolyfillFetch.js - node_modules n-fetch-blobindex.js 
Javascript :: js replace non a-z 
Javascript :: redirect window 
Javascript :: window.ReactNativeWebView.postMessage 
Javascript :: js parse url decode 
Javascript :: js get selection start from contenteditable 
Javascript :: javascript degree to radians 
Javascript :: Data path "" should NOT have additional properties(es5BrowserSupport 
Javascript :: yellowbox react native 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =