I would like to detect a refresh page (f5 or the refresh button in the browser) in react in order to perform function. Basically i would like to call an API when the refresh