Hi, I would like to make an API call when the user closes the app. I read this topic that says that it's not possible to use listeners because we don't have access to the window.
Also I tried out with a custom component, following this topic, but no luck still.
My goal is to make this API call to prevent users to leave the app without saving some changes to the database. I was looking forward to use the javascript beforeunload
event.
Is there a way to achieve this? FYI I thought about using onBlur, on close event handler in some components, but they wouldn't work the way I need.