Skip to content

Sort-comp rule doesn't enforce getDerivedStateFromProps placement #1793

Closed
@lynxtaa

Description

@lynxtaa

With "react/sort-comp": "warn" provided code shouldn't be considered valid:

static getDerivedStateFromProps(nextProps, prevState) {}

state = {}

Tested on version 7.8.2

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