chefcurry7 chefcurry7 - 1 year ago 135
React JSX Question

Cancel componentUnmount when navigating away

I would like to give a user notification if they have started an application and are navigating away without saving. Once they click on another tab, the componentWillUnmount function will fire, is there anyway I can cancel it in case a user decides to stay on the same form?

Answer Source

Since you are using React Router, see Confirming Navigation.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download