DEV Community

Discussion on: Passing Data with React Router using Link

Collapse
 
beko09 profile image
abobaker hilal

Can use hook useLocation() from react-router-dom to access state

Collapse
 
ryanflorence profile image
Ryan Florence

Yes, it's like a hidden piece of the URL, available on location.state even after a refresh.

Collapse
 
nelsieborja profile image
Nelsie Borja

And how to reset it in a proper way?