jsx-eslint/eslint-plugin-react

react/require-optimization warns when using PureRenderMixin.shouldComponentUpdate

Open

#1 019 ouverte le 11 janv. 2017

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)JavaScript (8 630 stars) (2 797 forks)batch import
enhancementhelp wanted

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

Guide contributeur