Skip to content

Consider adding no-access-state-in-setstate to recommended #2293

Open
@noahbenham

Description

@noahbenham

Using this.state within setState is a very common pattern for developers new to React. This practice can lead to insidious bugs. Should react/no-access-state-in-setstate be part of the recommended set instead of asking consumers to manually enable it?

I'm happy to open a PR but wanted to start a discussion first in case omission was intentional.

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