Skip to content

sort-comp: static defaultProps must be placed under componentWillUnmount() #122

Closed
@andrevinsky

Description

For some reason, the ES6 class composition for React isn't taken into account.

For all obvious reasons, while this is supposed to be the right sort order..

class AccountInfo extends Component {

  static propTypes = {
    accountId: PropTypes.string.isRequired
  };

  static defaultProps = {
    accountId: ''
  };

..a warning shows that says:
warning defaultProps must be placed after componentWillUnmount react/sort-comp

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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