fake-preact icon indicating copy to clipboard operation
fake-preact copied to clipboard

模仿 preact 的源码,写一个类似 react 的框架

目的

通过模仿 preact 的源码,写一个类似 react 的框架。

已实现功能

  • [x] 解析 JSX,一次性渲染到页面中,详见 examples/basic
  • [x] extend Component
  • [ ] vDOM diff

如何启动项目

npm i
npm run build

在 examples 各个子文件夹内会生成 bundle.js 文件,打开 index.html 便能运行例子。