一个基于 Signal 的 Web Component 前端框架,目标是构建下一代 Web 应用。
- 无感 Signal 驱动:创新的编译手段,你可以无感使用信号
- 高性能:细粒度响应,无虚拟 DOM
- Web Component 一流支持:无缝的 Web Component 框架开发体验
推荐使用 typescript
npm i typescript -D
npx tsc --initnpm i j20
npm i vite @j20org/vite-plugin -Dtsconfig.json
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "j20",
"moduleResolution": "bundler"
}
}vite.config.mjs
import { defineConfig } from "vite";
import { j20 } from "@j20org/vite-plugin";
export default defineConfig({
plugins: [
j20(),
],
});使用 createRoot 方法创建应用
import { createRoot } from "j20";
const App = () => <span>hello world</span>;
createRoot(App, document.querySelector("#root"));请访问 官方文档
MIT @anuoua