component-pure-render

0.0.7 • Public • Published

介绍

处理组件是否需要执行diff

安装

npm install --save component-pure-render

使用

import {Component} from 'react';
import shouldComponentUpdate from 'component-pure-render';

class ComponentName extends Component {
    constructor(props) {
        super(props);
        this.shouldComponentUpdate = shouldComponentUpdate.bind(this);
    }
    render() {
        return (
            <div>123</div>
        );
    }
}

export default ComponentName;

Readme

Keywords

Package Sidebar

Install

npm i component-pure-render

Weekly Downloads

3

Version

0.0.7

License

ISC

Last publish

Collaborators

  • huazaierli