Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经在 Preact 的 repo 中了解了这些框架之间的差异。我想深入了解 React 和 Preact 差异算法之间的区别。
它们都适用于 VirtualDOM。Preact 如何检查一个元素是否应该被创建、更新、删除?key在框架中是否具有相同的行为?它是否id用于元素等?有没有关于该主题的文章、讨论?
key
id
我有一个 30 分钟的演讲来解释 Preact 的差异,包括键的工作原理和元素创建/更新的语义: https ://youtu.be/LY6y3HbDVmg