Bug: ESLint react-hooks/exhaustive-deps rule false positive on constants made with constant expressions #21274
Labels
Component: ESLint Rules
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Type: Enhancement
React version: 16.14.0 & 17.0.2
Steps To Reproduce
Code example:
CodeSandbox: https://codesandbox.io/s/funny-wilson-33zxb
The current behavior
I see the following ESlint warning:
The expected behavior
I see no warning.
In my example the
a
variable is skipped in the ESlint warning, but not the other three variables even those they are all constant expressions.The text was updated successfully, but these errors were encountered: