All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
18 lines
445 B
JavaScript
18 lines
445 B
JavaScript
// @flow
|
|
|
|
// Pulled from react-compat
|
|
// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349
|
|
export default function shallowDiffers(prev: Object, next: Object): boolean {
|
|
for (let attribute in prev) {
|
|
if (!(attribute in next)) {
|
|
return true;
|
|
}
|
|
}
|
|
for (let attribute in next) {
|
|
if (prev[attribute] !== next[attribute]) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|