question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Related 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:closed
  • Created a year ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
zombieJcommented, Jul 13, 2022

useErrors 和 useStatus 的区别是?

Form.useError 是字段的 error 变化触发 rerender,FormItem.useStatus 是直接消费来自 FormItem 的 Context 里的 status 信息用于渲染展示(是用于自定义组件消费 FormItem 内部数据): 截屏2022-07-13 上午10 50 40

1reaction
afc163commented, Jul 13, 2022

想到的可以都先写出来,不一定都要做。

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found