DEV Community

Discussion on: Passing Data with React Router using Link

Collapse
 
medaminefh profile image
Mohamed Amine Fh

Actually that's how react works, if you refresh the page in any component, the state will reset.
if you're trying to send some data (you get it from the server using fetch API) to another component, and you want to refresh the page or to handle the page from crushing, just fetch again that specific data.