Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

getting state in react-router-dom v6

import { useLocation } from 'react-router-dom';

const location = useLocation()

const { state } = location.state
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #state
ADD COMMENT
Topic
Name
4+2 =