@pixi/react
Version:
Write PixiJS applications using React declarative style.
26 lines (22 loc) • 579 B
JavaScript
;
var diffProps = require('./diffProps.js');
var log = require('./log.js');
;
function prepareUpdate(_instance, _type, oldProps, newProps) {
log.log("info", "lifecycle::prepareUpdate");
const {
children: newChildren,
...newPropsRest
} = newProps;
const {
children: oldChildren,
...oldPropsRest
} = oldProps;
const diff = diffProps.diffProps(newPropsRest, oldPropsRest, true);
if (diff.changes.length) {
return diff;
}
return null;
}
exports.prepareUpdate = prepareUpdate;
//# sourceMappingURL=prepareUpdate.js.map