jsx-eslint/eslint-plugin-react

react/require-optimization warns when using PureRenderMixin.shouldComponentUpdate

Open

#1,019 创建于 2017年1月11日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)JavaScript (2,797 fork)batch import
enhancementhelp wanted

仓库指标

Star
 (8,630 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南