react-hook-form
React Hook Form — performant form management with uncontrolled inputs, validation, and field arrays.
от skeletorflet★ 48 звёзд на GitHub
Установить react-hook-form в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
react-hook-form
useForm & Register
useForm({ defaultValues: { name: '' } })— initialize form context.register('name', { required: true })— spread into<input>for uncontrolled binding.register('email', { pattern: /^\S+@\S+$/ })— inline validation rules.register('age', { valueAsNumber: true })— automatic type coercion.
Validation
- Native rules:
required,minLength,maxLength,min,max,pattern,validate. validate: (val) => val.length > 3 || 'too short'— custom sync/async validator.- Schema validation:
zodResolver(schema)/yupResolver(schema)from@hookform/resolvers. shouldUseNativeValidation: true— browser-native validation messages.
Errors & Form State
formState.errors.name?.message— per-field error object from validation.formState.isDirty,isSubmitting,isValid,submitCount— reactive form state.trigger('email')— manually validate a single field.setError('name', { message: 'taken' })— server-side validation errors.
useFieldArray
useFieldArray({ control, name: 'items' })— dynamic list of fields.fields.map((item, i) => <input key={item.id} {...register(items.${i}.value)} />).- Methods:
append,prepend,remove,insert,swap,move,replace. - Each field needs unique
idfromfieldsarray (not index as key).
Controller & Performance
<Controller render={({ field }) => <Select {...field} />} name="country" control={control} />.- Uncontrolled inputs = minimal re-renders;
Controllerfor custom/third-party components. useWatch({ name: 'field' })— subscribe to field changes without re-render.useFormContext()/<FormProvider>— shared form context for deeply nested components.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл react-hook-form?
React Hook Form — performant form management with uncontrolled inputs, validation, and field arrays.
Как установить скилл react-hook-form?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-hook-form запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…