Files
supabase/.claude
Alaister YoungandAlaister Young 0009b4bcdf chore(claude): hoist static form references in RHF skill example (#48434)
Quick follow-up to #48431 addressing Ivan's post-merge feedback: the
canonical form example now defines `FORM_ID`, the zod schema, and static
`defaultValues` at module level so they're stable references rather than
being recreated on every render, with a note to use `useMemo`
(runtime-dependent schemas) or the `values:` option (server-driven
defaults) when hoisting isn't possible.

## To test

- Skim the diff — docs-only change to
`.claude/skills/react-hook-form/SKILL.md`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Updated the React Hook Form guidance with a canonical example using
stable, module-level form configuration.
* Clarified that schemas, inferred types, default values, and form
identifiers should be defined outside the component.
* Documented how submit buttons outside the form should reference the
shared form identifier (and cautioned to use per-instance IDs when the
component may mount multiple times).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-07-29 17:17:15 +08:00
..