rl0425 / use-form-guard
PublicFramework-agnostic React hook to prevent accidental navigation with unsaved form changes. Works with Next.js App Router, React Hook Form, Formik, and more.
A tiny React tool that watches web forms and warns users before they accidentally navigate away with unsaved changes.
How It Works
You're creating a page on your website where people can edit their info, like updating a profile or writing a message.
You hear about a simple helper that stops people from accidentally losing their unsaved work when they try to leave the page.
You easily add this little protector to your website project so it's ready to use.
You connect it to your form, and now it quietly keeps an eye on any changes people make.
Someone starts typing or changing things in the form without hitting save yet.
If they click away, close the tab, or hit back, a friendly warning pops up asking if they're sure about losing their work.
They either stay to save their changes or leave knowing exactly what they're doing— no more lost drafts!
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.