Skip to content

sort-comp: 'instance-variables' doesn't work properly #1587

Closed
@ktaras

Description

@ktaras

Extracted as a separate issue from #599 (comment)

It seems like instance-variables works only for state.
I specified following order:

      - static-methods
      - instance-variables
      - lifecycle
      - everything-else
      - render

When I declare

class CoolComponent extends Component {
  state = {};
  ...
}

it's OK, but when I add some custom property, e.g.:

class CoolComponent extends Component {
  state = {};
  someList = [];
  ...
}

it throws an error:

someList should be placed after componentWillUnmount

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