You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ESLint rule eslint-plugin-react-hooks enforces a naming convention on hooks; they must all start with use. This is in line with the documentation around writing custom hooks. This is all good, works as intended.
The error message you get does not tell you this though. Example:
ESLint: React Hook "useEffect" is called in function "doesNotStartWithUse" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter.(react-hooks/rules-of-hooks)
It isn't clear from the error that the issue is the name. I intend to put a PR up for this; I created this issue as the contribution guide recommended it in the event the PR isn't accepted so others have something to search against.
The text was updated successfully, but these errors were encountered:
The ESLint rule
eslint-plugin-react-hooks
enforces a naming convention on hooks; they must all start withuse
. This is in line with the documentation around writing custom hooks. This is all good, works as intended.The error message you get does not tell you this though. Example:
Resulting message:
It isn't clear from the error that the issue is the name. I intend to put a PR up for this; I created this issue as the contribution guide recommended it in the event the PR isn't accepted so others have something to search against.
The text was updated successfully, but these errors were encountered: