Skip to content

Conversation

nan980914
Copy link

这种情况下预期与得到不符。代码链接如下:
https://codesandbox.io/s/patchchildren-keyed-double-end-add2-forked-fmecu?file=/src/index.js
未被处理的全新节点不应该插入到oldStartIdx索引所指向的节点之前,而是应该插入到newEndIdx + 1索引所指向的节点之前。修改后可得到预期效果。

这种情况下预期与得到不符。代码链接如下:
https://codesandbox.io/s/patchchildren-keyed-double-end-add2-forked-fmecu?file=/src/index.js
未被处理的全新节点不应该插入到oldStartIdx索引所指向的节点之前,而是应该插入到newEndIdx + 1索引所指向的节点之前。修改后可得到预期效果。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant