-
-
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
display-name triggered on default export using React.memo #2324
Comments
Thanks for confirming this was in vanilla js. :) |
Yep, I am getting the same error with something as simple as: export const Foo = React.memo(
function Foo() {
return <div>:(</div>;
}
); However, in the React dev tools, the component has the display name |
I'm also getting this error with the In all of these cases, as best I can see, the |
Still get the same issue as @TrevorSayre |
Please update to v7.17, released yesterday, and file a new issue if you’re still having trouble. |
Wrapping a named function declaration with a React.memo or React.forwardRef will no longer throw an false positive error Fixes jsx-eslint#2324. Fixes jsx-eslint#2269.
Hi There, I'm getting the same problem, the version is 7.18.0 |
@SmirnovW please file a new issue |
This issue was originally reported by @jwalton in #2133. Confirmed that issue exists in 7.13.0 and 7.14.1 (we are not using typescript in our project).
In latest build, this appears to be broken for a default export (although... I'm in a typescript project, so this might be a problem specific to linting .tsx files):
triggers react/display-name, but:
does not.
Originally posted by @jwalton in #2133 (comment)
The text was updated successfully, but these errors were encountered: