jsx-eslint/eslint-plugin-react

react/require-optimization warns when using PureRenderMixin.shouldComponentUpdate

Open

#1,019 opened on Jan 11, 2017

 (4 comments) (0 reactions) (0 assignees)JavaScript (2,731 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (9,293 stars)
PR merge metrics
 (PR metrics pending)

Description

react/require-optimization reports the following as incorrect even though it follows Facebook's documentation for using PureRenderMixin with ES6 classes (link):

export class MyComponent extends React.Component {
    constructor(props) {
        super(props);
        this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
    }
}

I can try submitting a fix if you agree that this is actually a bug

Contributor guide