@pixi/react
Version:
Write PixiJS applications using React declarative style.
24 lines (21 loc) • 542 B
JavaScript
import { diffProps } from './diffProps.mjs';
import { log } from './log.mjs';
;
function prepareUpdate(_instance, _type, oldProps, newProps) {
log("info", "lifecycle::prepareUpdate");
const {
children: newChildren,
...newPropsRest
} = newProps;
const {
children: oldChildren,
...oldPropsRest
} = oldProps;
const diff = diffProps(newPropsRest, oldPropsRest, true);
if (diff.changes.length) {
return diff;
}
return null;
}
export { prepareUpdate };
//# sourceMappingURL=prepareUpdate.mjs.map