Replies: 1 comment
-
@bzbetty I use controls b/c that's how I've built my input components in the past and they're more flexible. (I'm a React Native developer mainly, so I have to use them.) I'm not a huge fan of With the controller approach, you get a lot of the same performance benefits without sacrificing flexibility. Sometimes you have to have a controlled component, and so going with I do think some (a lot?) of people prefer If you want, you can wrap your form in a const myForm = useForm();
return (
<FormProvider {...myForm}>
<Form
form={myForm}
/>
</FormProvider>
) Might add this, I'll have to think about it... Currently leaning towards just having one API |
Beta Was this translation helpful? Give feedback.
-
I'm used to using a so my inputs can useFormContext, but that needs a UseFormReturns which doesn't seem to be supplied by this library.
On a sidenote this library seems to make a lot of use of Control which I thought was frowned upon directly accessing, could be because you seem to favour controlled and not uncontrolled form fields?
Beta Was this translation helpful? Give feedback.
All reactions