Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

useNavigate history back

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

...
navigate(-1); // Go back 1 page in history 
navigate(-2); // Go back 2 pages in history 
navigate(1); // Go 1 page forward in history
navigate(2); // Go 2 pages forward in history
Comment

PREVIOUS NEXT
Code Example
Javascript :: password confirmation using Joi 
Javascript :: click unbind 
Javascript :: javascript validate string with regex 
Javascript :: upload image react 
Javascript :: disable javascript chrome 
Javascript :: javascript select change selected 
Javascript :: biding multiple class vuejs 
Javascript :: disabled radio button 
Javascript :: counter in javascript 
Javascript :: javascript json deserialize 
Javascript :: react read multiple files with filereader 
Javascript :: function call ready resize and load 
Javascript :: add table row jquery 
Javascript :: javascript insert element after 
Javascript :: javascript onkeydown 
Javascript :: js check if array of dictionaries contain 
Javascript :: javascript change color every second 
Javascript :: how to send a request to a web server javascript 
Javascript :: find by array of ids mongoose 
Javascript :: run onclick function once js 
Javascript :: bubble sort js 
Javascript :: Pass object to query on Router.push NextJs 
Javascript :: sequelize change column 
Javascript :: Mars Exploration problem in js 
Javascript :: reset select option jquery 
Javascript :: javascript code to calculate compound interest 
Javascript :: form submit event get button 
Javascript :: react native create apk 
Javascript :: useeffect dependency error 
Javascript :: array shuffle 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =