react-pure-render
Version:
A function, a component and a mixin for React pure rendering
16 lines (10 loc) • 520 B
JavaScript
;
exports.__esModule = true;
exports['default'] = shouldPureComponentUpdate;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _shallowEqual = require('./shallowEqual');
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
function shouldPureComponentUpdate(nextProps, nextState) {
return !(0, _shallowEqual2['default'])(this.props, nextProps) || !(0, _shallowEqual2['default'])(this.state, nextState);
}
module.exports = exports['default'];