Skip to content

Recommend eslint:no-label for functional setState #1004

Open
@tsiq-swyx

Description

@tsiq-swyx

this is a pretty common mistake when using the functional form of setState:

image

and we have no warning in React (yet) for this when it happens. easiest guard is having eslint:no-label tell you about it. Should we add a mention in the setState docs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions