In this video, we will develop a custom hook to display warning alert when the user tries to navigate or close the browser without submitting the form changes.
Confirmation Before Closing of Tab/Browser in ReactJS
This will save users from accidentally discarding the changes made to a large form.
Demo + Source :
https://react-component-depot.netlify...
If you like the video, please support it by subscribing to the channel.