no-unused-state
Configuration
rslint.config.ts
Rule Details
Warns when a React component defines state fields that are never read anywhere in the component. State can be defined via constructor assignments (this.state = {}), class property declarations (state = {}), this.setState() calls, or getInitialState() returns in ES5 components.
Examples of incorrect code for this rule:
Examples of correct code for this rule: