Field.Root: Rules of hooks violation #2645
Closed
jonathan-sawmills
started this conversation in
General
Replies: 1 comment
-
Thanks for fix @jonathan-sawmills |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I've encountered a React rules of hooks violation inside Field's
useField
hook.Rules of hooks: https://react.dev/reference/rules/rules-of-hooks#only-call-hooks-at-the-top-level
The violation is here (
useId
is conditionally called):https://github.com/chakra-ui/ark/blob/main/packages/react/src/components/field/use-field.ts#L33
Beta Was this translation helpful? Give feedback.
All reactions