jsx-eslint/eslint-plugin-react

react/require-optimization warns when using PureRenderMixin.shouldComponentUpdate

オープン

#1,019 opened on 2017/01/11

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (2,731 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (9,293 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド