-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue: API Breakage on FieldErrors #8619
Comments
please follow the issue template by providing a codesandbox to reproduce this issue then will reopen and look into it. |
Codesandbox link: https://codesandbox.io/s/goofy-fast-vdssvf Although the app runs in the sandbox (it fails for me locally), if you open src/TextField.tsx and src/MyForm.tsx you will see the highlighted errors. Change the react-hook-form dependency to 7.32 and it makes those errors go away. |
Same problem. The typedef has some sort of breaking change where it no longer passes a string. |
Same problem. Something is off with the typedef… `TS2367: This condition will always return 'false' since the types 'Merge<FieldError, FieldErrorsImpl<DeepRequired>> | undefined' and 'string' have no overlap. |
(Below is a quick test, i may miss something here) |
happens only with useFormContext, not with useForm –> https://codesandbox.io/s/sad-allen-tgj0ho?file=/src/FormField.tsx |
going back in the releases… 7.33.0 different errors: 7.32.2: all good, no errors |
I'm facing the same error |
Same issue here. I'm going to use |
Same |
Version Number
7.33.1
Codesandbox/Expo snack
Compile error, so no code sandbox is available.
Steps to reproduce
I am building out a set of Typescript React components (based on react-hook-form and react-bootstrap). The source code for this library is at:
https://github.com/craigmcc/shared-react
With react-hook-form 7.30.0, everything was fine.
With react-hook-form 7.33.1, I get compile errors trying to build the library (see the "Relevant Log Output" section below).
It looks like changes to the FieldErrors definition is what is triggering this.
TO REPRODUCE:
Expected behaviour
No compile errors.
What browsers are you seeing the problem on?
Chrome
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: