use-unsaved-changes HOOK 🪝

React hook for handling unsaved changes in forms

Overview

use-unsaved-changes is a React hook designed to simplify handling unsaved changes in forms. It provides an intuitive way to detect when a user has made changes to form fields and prompt them before navigating away.

Features

  • Detect Unsaved Changes
  • Customizable Prompts
  • Integration with Next App Router

Demo Example

Feedback

package by

Mohamed Saied
Picture of the author

Installation

npm install use-unsaved-changes

Documentation

API Documentation