This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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: useFieldArray and getFieldState causes react console warnings #11834
Comments
Might be related to the issue described in https://github.com/orgs/react-hook-form/discussions/10964#discussioncomment-9113909. |
Investigated this a bit more, and noticed that the issue seems to be related to passing the whole So in the example it would look like this function Validation() {
const {
getFieldState,
formState: { errors },
} = useFormContext();
const { invalid } = getFieldState("cats");
return invalid === true ? "BAD CATS" : "GOOD CATS";
} |
I still have this problem in 7.51.3 |
@sim391calado That was actually the version I used as well, not sure why the issue template generated an old version. Fixed that now. Did removing |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Version Number
7.51.3
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/nervous-pateu-v5t8t2
Steps to reproduce
Also, the render count increases a lot more than expected.
Expected behaviour
While the form works from the user perspective, I would expect it do so without producing React warnings.
What browsers are you seeing the problem on?
Chrome, Safari
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: