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.app/hooks-demo
#react #javascript #web-development #developer