Skip to content

Repository files navigation

J20

一个基于 Signal 的 Web Component 前端框架,目标是构建下一代 Web 应用。

官方文档

特点

  • 无感 Signal 驱动:创新的编译手段,你可以无感使用信号
  • 高性能:细粒度响应,无虚拟 DOM
  • Web Component 一流支持:无缝的 Web Component 框架开发体验

安装

推荐使用 typescript

npm i typescript -D
npx tsc --init

安装依赖

npm i j20
npm i vite @j20org/vite-plugin -D

TS 配置

tsconfig.json

{
    "compilerOptions": {
        "jsx": "react-jsx",
        "jsxImportSource": "j20",
        "moduleResolution": "bundler"
    }
}

Vite 配置

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"));

更多

请访问 官方文档

License

MIT @anuoua

About

前端框架歼20,专注于构建下一代 Web 应用

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages