UNPKG

@pixi/react

Version:

Write PixiJS applications using React declarative style.

24 lines (21 loc) 542 B
import { diffProps } from './diffProps.mjs'; import { log } from './log.mjs'; "use strict"; 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