qm-pure-render
v1.0.0
Published
pure render in order to replace PureRenderMixin
Downloads
9
Readme
Mixin Or HOC
Mixin => 命令式编程风格
HOC => 声明式的编程风格
Usage
package.json
{
"dependencies": {
"pure-render": "^1.0.0"
}
}
npm install
import PureRender from 'pure-render';
//debug状态
PureRender.__debug__ = true;
@PureRender
class Hello extends React.Component {
render() {
return (
<div>hello world</div>
);
}
}
log info....
Hello pure-render
Hello avoid unnecessary re-render
Hello compare lose time: 0.951ms