[API] Form hooks
See original GitHub issueRelated Issues
Hooks Design
Form Level
Which appears for the form level control
✅ Form.useForm
Create Form instance which store the data info
✅ Form.useWatch
Listen for specific name path value change state
🉑 Form.useMeta
Listen for Field meta change like errors, touched, dirty, validating
🚫 Form.useError
Can use Form.useMeta
instead
🚫 Form.useTouched
Can use Form.useMeta
instead
🚫 Form.useDirty
Can use Form.useMeta
instead
🚫 Form.useValidating
Can use Form.useMeta
instead
FormItem Level
Which only for consuming Form Item info. This hooks will only work under <Form.Item />
!
🉑 FormItem.useStatus
Get parent Form.Item validate status which will get the status & icon
Issue Analytics
- State:
- Created a year ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
API Documentation - React Hook Form
Performant, flexible and extensible forms with easy-to-use validation.
Read more >API | React Form Hooks Docs
Form library using React hooks and subscriptions. ... Accepts a form object (the value returned by useForm hook) and returns the current form...
Read more >React Hook Form: A guide with examples - LogRocket Blog
Learn all about using forms in React with React Hook Form, including how to create and validate forms — even with third-party components....
Read more >Hooks API Reference - React
Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class. This page...
Read more >Forms API Hooks - Toolset
This hook allows doing a custom action right before saving or processing any data but after validation. Arguments. form_data . An associative array...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Form.useError
是字段的 error 变化触发 rerender,FormItem.useStatus
是直接消费来自 FormItem 的 Context 里的 status 信息用于渲染展示(是用于自定义组件消费 FormItem 内部数据):想到的可以都先写出来,不一定都要做。