How to create a React hook to detect page refresh only once and return false on subsequent mounts?
I am trying to create a React hook that will detect if the user has just refreshed the page. The hook should return true
only on the first interaction after the page refresh. On subsequent mounts or interactions, it should return false
as long as the user does not refresh the page again.
How to create a React hook to detect page refresh only once and return false on subsequent mounts?
I am trying to create a React hook that will detect if the user has just refreshed the page. The hook should return true
only on the first interaction after the page refresh. On subsequent mounts or interactions, it should return false
as long as the user does not refresh the page again.
How to create a React hook to detect page refresh only once and return false on subsequent mounts?
I am trying to create a React hook that will detect if the user has just refreshed the page. The hook should return true
only on the first interaction after the page refresh. On subsequent mounts or interactions, it should return false
as long as the user does not refresh the page again.