Skip to content

Lint is incorrect for constructor : Inferno Error: cannot update state via setState() in constructor. Instead, assign to this.state directly or define a state = {}; #15

@dessalines

Description

@dessalines

If I use state = ... in a constructor, it fails lint. If I follow lint and use setState(, I get the following error:

404: Error: Inferno Error: cannot update state via setState() in constructor. Instead, assign to this.state directly or define a state = {};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions