Skip to content

Fix ignorePureComponents when using class expressions.#1122

Merged
yannickcr merged 17 commits intojsx-eslint:masterfrom
dreid:allow-wrapped-pure-components
May 15, 2017
Merged

Fix ignorePureComponents when using class expressions.#1122
yannickcr merged 17 commits intojsx-eslint:masterfrom
dreid:allow-wrapped-pure-components

Conversation

@dreid
Copy link
Copy Markdown
Contributor

@dreid dreid commented Mar 23, 2017

This allows the use of a React.PureComponent when used in an expression context for prefer-stateless-function with ignorePureComponents.

Example:

const Foo = class extends React.PureComponent {
  render() {
    return <div>{this.props.foo}</div>;
  }
};

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

7 participants