I have a use case where i want to render a confirmation box when user ties close a browser tab in my react application.
I have a queue which contains the requests to be made to the backend server. I want to render confirmation dialog with some custom message if queue is not empty and user closes browser tab.
Are there any recommended libraries or workflow hwich I should follow to achieve this??