Nothing works, I dont understand modern javascript
This commit is contained in:
parent
72666e9258
commit
d5cf369a75
139 changed files with 10138 additions and 55 deletions
15
crates/librqbit/webui/node_modules/preact/compat/src/PureComponent.js
generated
vendored
Normal file
15
crates/librqbit/webui/node_modules/preact/compat/src/PureComponent.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue