Creating Custom React Hooks: useConfirmTabClose
It's common to come across a situation where a user can navigate away from unsaved changes. For example, a social media site could have a user profile information form. When a user submits the form their data are saved, but if they close the tab befo...

