Custom Hooks may be executed more than once. #404
Unanswered
aufasyaihan
asked this question in
Q&A
Replies: 1 comment
-
The code you shared looks fine and doesn't break React hooks rules. The issue is probably is some part of the code I don't see. I think this error is important and you should not ignore it, it means you are breaking some of the rules of React rules and it could lead to bugs with weird behaviors. |
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
-
I was using custom hooks so that my logic would be stored there, but this error came up. The error is when I use the custom hook on Pagination.tsx. Can I ignore the warning or should I fix it?
React Hook "useQueryData" may be executed more than once. Possibly because it is called in a loop. React Hooks must be called in the exact same order in every component render.
Pagination.tsx
useQueryData.tsx
Beta Was this translation helpful? Give feedback.
All reactions