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
This issue is very similar to #18985 but it happens with useCallback instead of useEffect, and the error message is different.
eslint-plugin-react-hooks version: 4.0.4
Steps To Reproduce
The order of reference matters, if you flip the two calls to console.log no error is reported. And as in #18985 replacing ?. with . won't result in an error.
5:6 warning React Hook useCallback has an unnecessary dependency: 'props'. Either exclude it or remove the dependency array react-hooks/exhaustive-deps
The expected behavior
No warning should be reported.
The text was updated successfully, but these errors were encountered:
bvaughn
changed the title
Bug: Take 2: Unexpected warning in react-hooks/exhaustive-deps using optional chaining operator
Unexpected warning in react-hooks/exhaustive-deps using optional chaining operator
Jun 5, 2020
This issue is very similar to #18985 but it happens with
useCallback
instead ofuseEffect
, and the error message is different.eslint-plugin-react-hooks version: 4.0.4
Steps To Reproduce
The order of reference matters, if you flip the two calls to
console.log
no error is reported. And as in #18985 replacing?.
with.
won't result in an error.package.json
The current behavior
The following warning is reported:
The expected behavior
No warning should be reported.
The text was updated successfully, but these errors were encountered: