title: Confirmation Box on closing browser in React
body: <p>I have a use case where i want to render a confirmation box when user ties close a browser tab in my react application.</p>
  
  <p>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.</p>
  
  <p>Are there any recommended libraries or workflow hwich I should follow to achieve this??</p>