Skip to content

New rule: react-set-state-with-function #80

@adidahiya

Description

@adidahiya

Enforce usage of the callback form of this.setState

// bad
this.setState({ ... });
// good
this.setState((prevState, props) => ...);

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