有同学去侦查过 Deku 模块了吗

#1

上次是 Roit, 现在这个更明目张胆的, 干脆就说重新实现 React, 体积很小很小啊 10kb !:

A library for creating UI components using virtual DOM as an alternative to React. Deku has a smaller footprint (~10kb), a functional API, and doesn’t support legacy browsers.

有没有人去看过. 跟 React 对比起来如何?

#2

你看它的网页嘛,只使用较新的浏览器,没有React那么多限制

#3

还没上手过。他们在 Segment 博客上说了为什么体积很小: It uses the same concept of components as React. However, we don’t support older browsers, so the codebase is small and component API is almost non-existent.

也说了为什么当初不选 React,简单来说就是我们想对这门技术有深入的了解和控制,觉得 React 有点太 OO 了,不够 functional,所以重写了。

https://segment.com/blog/deku-our-functional-alternative-to-react/

#4

好像没说事件系统有没有重新处理过, 我记得 StackOverflow 说这部分的代码也很大的.

表示一直有点怀疑, React 从 Facebook 的代码当中剥离出来的时候会不会带上了很多 Lagecy code… 整个体积真心大.

#5

所以我们从后台pre-render了,加载个20k的文件不是太大问题