Replies: 3 comments 1 reply
-
any update? I face the same issue. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm a bit late to the party, but for any future people finding this thread: Check that you are importing the Form component from your ui folder and not from 'react-hook-form' (assuming you are using shadcn/ui Forms with react-hook-form ) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am posting this on the relevant repositories as I do not know what to do.
I have a project with NextJS that I've started to work on which has a
ui
package withtsup
and that contains tailwind based components via shadcn and one of the components is form usingreact-hook-form
.Problem 1 -
react-hook-form
When I use the form component, I get this error, even though I have configured tsup to do "use client"; and also in the component itself I am using "use client";
TypeError: Cannot destructure property 'getFieldState' of '(0 , react_hook_form__WEBPACK_IMPORTED_MODULE_5__.useFormContext)(...)' as it is null.
Any help would be appreciated, or at least some steps to the right direction. Here is my project
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions