Skip to content

react/no-unused-state triggered when optional chaining is used #2515

Closed
@gustavolaux

Description

@gustavolaux

eslint: 6.5.1
eslint-plugin-react: 7.16.0
babel-eslint: 10.0.3

in constructor:

this.state = {
  downloading: false,
}

but when this.state?.downloading is used i got this message:

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions