GA-MO / react-confirm-alert

react component confirm dialog.
https://ga-mo.github.io/react-confirm-alert/demo/
MIT License
273 stars 105 forks source link

Close confirm alert #57

Closed vasu-tamrakar closed 3 years ago

vasu-tamrakar commented 3 years ago

I have opened confirm alert, then I have clicked on browser go back button. then should be close alert popup on next page. now showing confirm alert popup on other page. I want to only same page. how to manage this.

GA-MO commented 3 years ago

@vasu-tamrakar You can use componentWillUnmount to close the confirm alert. This lifecycle will call when the page unmount and yes (click browser go back button) as well.