Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
smoores-dev committed Oct 4, 2024
1 parent e60a18e commit 00b5ebe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 8 additions & 1 deletion dist/cjs/components/ChildNodeViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,14 @@ const ChildElement = /*#__PURE__*/ (0, _react.memo)(function ChildElement(param)
getInnerPos: getInnerPos
});
}
});
}, /**
* It's safe to skip re-rendering a ChildElement component as long
* as its child prop is shallowly equivalent to the previous render.
* posToKey will be updated on every doc update, but if the child
* hasn't changed, it will still have the same key.
*/ (prevProps, nextProps)=>prevProps.child.type === nextProps.child.type && prevProps.child.marks.every((mark)=>mark.isInSet(nextProps.child.marks)) && nextProps.child.marks.every((mark)=>mark.isInSet(prevProps.child.marks)) && prevProps.child.offset === nextProps.child.offset && // @ts-expect-error It's fine if these are undefined
prevProps.child.node === nextProps.child.node && // @ts-expect-error It's fine if these are undefined
prevProps.child.widget === nextProps.child.widget);
function createChildElements(children, getInnerPos, // doc: Node | undefined,
posToKey) {
if (!children.length) return [];
Expand Down
9 changes: 8 additions & 1 deletion dist/esm/components/ChildNodeViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,14 @@ const ChildElement = /*#__PURE__*/ memo(function ChildElement(param) {
getInnerPos: getInnerPos
});
}
});
}, /**
* It's safe to skip re-rendering a ChildElement component as long
* as its child prop is shallowly equivalent to the previous render.
* posToKey will be updated on every doc update, but if the child
* hasn't changed, it will still have the same key.
*/ (prevProps, nextProps)=>prevProps.child.type === nextProps.child.type && prevProps.child.marks.every((mark)=>mark.isInSet(nextProps.child.marks)) && nextProps.child.marks.every((mark)=>mark.isInSet(prevProps.child.marks)) && prevProps.child.offset === nextProps.child.offset && // @ts-expect-error It's fine if these are undefined
prevProps.child.node === nextProps.child.node && // @ts-expect-error It's fine if these are undefined
prevProps.child.widget === nextProps.child.widget);
function createChildElements(children, getInnerPos, // doc: Node | undefined,
posToKey) {
if (!children.length) return [];
Expand Down
2 changes: 1 addition & 1 deletion dist/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit 00b5ebe

Please sign in to comment.