Rules
no-access-state-in-setstate
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
core
recommended
recommended-typescript
recommended-type-checked
What it does
Disallows accessing this.state
inside setState
calls.
Usage of this.state
inside setState
calls might result in errors when two state calls are called in batch and thus referencing old state and not the current state.