光轨资源网 / 开源项目
solidjs/solid
一个用于构建用户界面的声明式、高效且灵活的 JavaScript 库。
可以做什么
import { createSignal } from "solid-js";
怎么部署
Quick start
Start from a template:
npx degit solidjs/templates/solid-v2/basic my-app
cd my-app
npm install
npm run dev
Or add Solid to an existing Vite project:
npm i solid-js @solidjs/web
npm i -D vite @solidjs/vite-plugin
// vite.config.ts
import { defineConfig } from "vite";
import solid from "@solidjs/vite-plugin";
export default defineConfig({
plugins: [solid()]
});
and point TypeScript at the web JSX types:
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "@solidjs/web"
}
}
solid-js owns renderer-neutral component types, while renderer packages such as @solidjs/web and @solidjs/h own their JSX namespaces and jsx-runtime type entries.
Coming from Solid 1.x?
Read the [migration guide](documentation/solid-2.0/MIGRATION.md). Solid 1.x is maintained on the 1.x branch, installs with npm i solid-js@v1-latest, and its docs are at v1.solidjs.com.
项目信息
项目地址:https://github.com/solidjs/solid
语言:TypeScript
Star 数:36306(2026-11-18 采集)
原文简介(English)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
本站资源用于学习与开发参考,请遵守对应授权协议。