menu

React Hook Form

📋 Custom React hooks for form validation without the hassle

Channels
Team
Posts
Members
Info

useFieldArray with register field values in reset

https://codesandbox.io/embed/practical-bush-2tvdn?file=/src/App.js i am making a update form, and the data is from backend. i have a field with array, but i need the ID to know what update, so i put an register({ name: `field[${index}].id` }) to pick the value from reset that…

thumbsup
0
message-simple
1

MIA for sometimes

Hi Guys, I am busy working on issues at the moment, so some of the questions will need support from the community. I will be back once those issues on Github gets resolved. Thanks for understanding. I will switch off those notification for now,. Thanks …

thumbsup
3
message-simple
1

Difference between `defaultValuesRef` and `defaultRenderValuesRef`?

What is the difference between defaultValuesRef and defaultRenderValuesRef in useForm.ts?

thumbsup
0
message-simple
0

Combining `validationSchema` and `rules` from Controller/register

Hey all! I'm basically using validation schema, as described here: https://react-hook-form.com/advanced-usage#SchemaValidation But now I need to implement rules to use watch() inside, that is not available in schema/yup. Could you please advice me a best approach for that? rules…

thumbsup
0
message-simple
4

Recursive form fields, problems with `useFieldArray`

I have a recursive component structure, where there are <Field> and <ListField> components, where the ListField uses useFieldArray and each list item is made up of multiple <Field> and/or <ListField> components. My forms are generated at runtime, driven by config (ie: form…

thumbsup
0
message-simple
24

Using `watch(name)` seems to cause re-renders when any field is changed.

My form's values look like this: I have Question component which renders a list of SubQuestion components. The Question component uses useFormContext and watch with its question key (eg: watch('question1') to track all subquestion values. I'm tracking all subquestion values…

thumbsup
0
message-simple
5

Looking for a contractor with experience building forms in React

My company is building a lot of complicated web forms in the finance space and we are looking for someone with deeper expertise in building forms with react. We are currently using react-hook-forms and create-react-app. Respond to this post with a github, linkedin, or portfolio…

thumbsup
4
message-simple
2

Workaround for React-Select and submitFocusError?

I understand React-Select doesn't expose ref. Is there any workaround to make submitFocusError to work with React-Select? Thanks.

thumbsup
0
message-simple
9

Use react-hook-form with react-native-multiple-select?

Is it possible to use it with https://github.com/toystars/react-native-multiple-select ? The ref signature is not compatible and even using Controller I don't know how to map onSelectedItemsChange and selectedItems

thumbsup
0
message-simple
5

Does using FormContext have performance cost?

If so, is it significant?

thumbsup
0
message-simple
12