Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

passing state in link react

import { useNavigate } from "react-router-dom";
const history = useNavigate();

history('/send-message', {state: 'data'});


import { useLocation } from "react-router-dom";
const location = useLocation();

console.log(location.state);
Comment

PREVIOUS NEXT
Code Example
Javascript :: react typed js 
Javascript :: js delete element 
Javascript :: how to pause js execution 
Javascript :: google maps js remove google maps logo 
Javascript :: react form submit 
Javascript :: vowel 
Javascript :: react native indicator 
Javascript :: console.log clear screen 
Javascript :: electron mass to amu 
Javascript :: flatlist horizontal 
Javascript :: conditionally changing styled components based on props 
Javascript :: saveas angular 6 
Javascript :: render react in blaze 
Javascript :: miles to metres 
Javascript :: javascript constructor and prototype 
Javascript :: deleting key of json object 
Javascript :: how to launch several async functions in node js 
Javascript :: jquery set input value 
Javascript :: how to generate random id in javascript 
Javascript :: What is the Difference between Undefined, undeclared, Null 
Javascript :: add onclick event jquery button 
Javascript :: wait function in javascript 
Javascript :: sequelize where more than 
Javascript :: allow only numbers and special characters in textbox using javascript 
Javascript :: validate mobile number in javascript 
Javascript :: jwt token expire time in node js 
Javascript :: if else alert js 
Javascript :: angular json to file and download 
Javascript :: javascript element edit text 
Javascript :: npm numeral 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =