Skip to content
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/no-unused-state doesn't detect usage of this.state as an object #1572

Closed
julienw opened this issue Nov 27, 2017 · 1 comment
Closed

Comments

@julienw
Copy link
Contributor

julienw commented Nov 27, 2017

Here is an example:

<div
  className={classNames('overflowEdgeIndicator', className, this.state)}
>

classNames is the excellent classnames package.

Notice the use of this.state directly as a parameter to the classNames call. As a result, the rule react/no-unused-state doesn't detect we use some of the state properties and output an error.

@julienw
Copy link
Contributor Author

julienw commented Nov 28, 2017

thx !

This was referenced Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant