-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[react/destructuring-assignment] Shows weird behaviour when I declare a variable with the name context #2309
Comments
The error here should appear imo with any variable name coming from the useContext hook. Does the error disappear if you use a different variable name? |
No, then it doesn't appear. |
There seems like two bugs then:
|
I think the error message on that case is correct following this rule, isn't it? |
@Zinyon the rule is supposed to enforce legacy context being destructured; it's not supposed to warn on |
@ljharb Thank you, it makes sense! and I'll try fix this. |
In a functional component I get an error when I declare a variable with the name context.
Example code:
The text was updated successfully, but these errors were encountered: