form-library-integration

Community

Round-trip form state through the URL

Authorasmyshlyaev177
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill solves the problem of keeping a React form’s current values perfectly synchronized with shareable URL state so users can reload, share, and return to the same draft without losing their inputs.

Core Features & Use Cases

  • Module-scoped default state sharing: Define a single module-scoped defaults object that both useUrlState and useForm use to maintain a stable form shape and identity.
  • URL hydration → form initialization: Hydrate useForm by passing defaultValues: urlState so the form starts from whatever is currently encoded in the URL.
  • Push-based form → URL updates: Sync form changes back into the URL by subscribing via RHF subscribe() (not watch()) and calling setUrl(values) to coalesce updates efficiently.
  • Use cases: Filter UIs, search forms, and multi-step wizards where the URL should act as a draft store for round-trippable form values.

Quick Start

Load this skill when you want your form values to be shareable as a URL draft link, then wire useUrlState and useForm to share module-scoped defaults with defaultValues: urlState and update the URL using RHF subscribe().

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: form-library-integration
Download link: https://github.com/asmyshlyaev177/state-in-url/archive/main.zip#form-library-integration

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.