component-pure-render
v0.0.7
Published
should component update
Downloads
4
Readme
介绍
处理组件是否需要执行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;