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
switch (node.name) {
case 'useEffect':
case 'useLayoutEffect':
+ case 'useInsertionEffect':
case 'useCallback':
case 'useMemo':
// useEffect(fn)
return 0;
I have created PR #31969 (tests included), which should address this issue and is currently awaiting for review. Do let me know if you have any additional thoughts on this in the meantime.
React version: 18
eslint-plugin-react-hooks version: 4.6.2
Steps To Reproduce
Run eslint. with eslint-plugin-react-hooks with the following two code:
The current behavior
The plugin reports a warning for the first case and doesn't for the second.
The expected behavior
For both cases the plugin should report a warning.
As a workaround, I currently have to update the config:
The text was updated successfully, but these errors were encountered: