title: Sending API call before page reload or close using React
body: <p>I am trying to send information to the backend regarding the state of the application at page reload/close. Is there a way to detect these two actions and call an API before proceeding?</p>