deploy: ebd4cc0010
This commit is contained in:
15
node_modules/preact/compat/src/PureComponent.js
generated
vendored
15
node_modules/preact/compat/src/PureComponent.js
generated
vendored
@@ -1,15 +0,0 @@
|
||||
import { Component } from 'preact';
|
||||
import { shallowDiffers } from './util';
|
||||
|
||||
/**
|
||||
* Component class with a predefined `shouldComponentUpdate` implementation
|
||||
*/
|
||||
export function PureComponent(p) {
|
||||
this.props = p;
|
||||
}
|
||||
PureComponent.prototype = new Component();
|
||||
// Some third-party libraries check if this property is present
|
||||
PureComponent.prototype.isPureReactComponent = true;
|
||||
PureComponent.prototype.shouldComponentUpdate = function (props, state) {
|
||||
return shallowDiffers(this.props, props) || shallowDiffers(this.state, state);
|
||||
};
|
||||
Reference in New Issue
Block a user