mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 13:32:07 +07:00
Fix dependencies: Add flag-icons, tailwind directives, and postcss config
This commit is contained in:
16
node_modules/preact/compat/src/PureComponent.js
generated
vendored
Normal file
16
node_modules/preact/compat/src/PureComponent.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Component } from 'preact';
|
||||
import { shallowDiffers } from './util';
|
||||
|
||||
/**
|
||||
* Component class with a predefined `shouldComponentUpdate` implementation
|
||||
*/
|
||||
export function PureComponent(p, c) {
|
||||
this.props = p;
|
||||
this.context = c;
|
||||
}
|
||||
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