Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inferno算法那里有小bug,没有处理不移动但有新增节点 #292

Open
JSerFeng opened this issue Mar 14, 2021 · 0 comments
Open

Comments

@JSerFeng
Copy link

`
const prevVNode = h('div', null, [
h('p', { key: 'a' }, '节点1'),
h('p', { key: 'b' }, '节点2')
])

// 新的 VNode
const nextVNode = h('div', null, [
h('p', { key: 'a' }, 'new 节点1'),
h('p', { key: 'c' }, 'new 节点3'),
h('p', { key: 'd' }, 'new 节点4'),
h('p', { key: 'b' }, 'new 节点2'),
h('p', { key: 'g' }, 'new 节点7'),
h('p', { key: 'e' }, 'new 节点5')
])
`
这段示例代码会只渲染出前两个,因为不需要移动,直接退出diff了,没有mount新的

大大,我自己在写一个小框架来总结学习,受到你的渲染器文章的帮助真的很大,真的帮助了我好多,我看过好几遍了,写的时候有些地方忘了也经常回看看你是怎么处理的,真的很敬佩你花这么多时间来无偿输出知识,vue3的issue也秒回我,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant