
solidjs/solid
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
사용자 인터페이스 구축을 위한 declarative, 능률적이고 유연한 JavaScript 라이브러리.
개요
Solid is a declarative JavaScript library for building user interfaces. Virtual DOM 대신 템플릿을 실제 DOM 노드로 컴파일하고 정밀한 편두 원자로로 업데이트합니다. 당신의 상태를 결정하고 응용 프로그램을 통해 사용 - 국가 변경의 조각이 될 때, 그것은 다시 실행에 따라 코드 만. 솔리드는 JSX를 빌드 시간에 실제 DOM 작업에 컴파일합니다. 구성 요소 기능은 마운트에 한 번 실행; 반응은 per-expression, per-render. {doubled()} expression은 count()가 변경될 때 하나의 DOM 위치만 터치하는 트랙된 업데이트로 컴파일됩니다. 다음 microtask (또는 비동기 interop)에 업데이트를 읽으십시오. 효과는 추적 compute 단계로 나뉩니다. 부작용은 전체 모델에 대한 docs를 참조하십시오. - 실제 DOM에 대한 Fine-grained 업데이트 - 가상 DOM diff가 없습니다. - 선언적인 민감성 원시 (createSignal, createMemo, createStore). - Render-once 구성 요소 - 구성 요소 기능은 한 번 실행하는 일반 JavaScript입니다.
개요(AI 번역)
웹 사이트 • 문서 • 자습서 • 놀이터 • Discord
Solid is a declarative JavaScript library for building user interfaces. Virtual DOM 대신 템플릿을 실제 DOM 노드로 컴파일하고 정밀한 편두 원자로로 업데이트합니다. 당신의 상태를 결정하고 응용 프로그램을 통해 사용 - 국가 변경의 조각이 될 때, 그것은 다시 실행에 따라 코드 만.
한 눈에
우리의 놀이터에서 시도.
감사합니다!
솔리드는 JSX를 빌드 시간에 실제 DOM 작업에 컴파일합니다. 구성 요소 기능은 마운트에 한 번 실행; 반응은 per-expression, per-render. {doubled()}] expression은 count()가 변경 될 때 하나의 DOM 위치를 만 터치하는 트랙 된 업데이트에 컴파일한다.
다음 microtask (또는 호출 flush()])에 업데이트를 읽습니다. 효과는 추적으로 나뉩니다 compute 단계와 부작용 apply 단계 - 전체 모델에 대한 docs를 참조하십시오.
키 기능
- 실제 DOM에 대한 Fine-grained 업데이트 - 가상 DOM diff가 없습니다.
- 선언 반응성 원시 (
createSignal],createMemo],createStore]). - Render-once 구성 요소 - 구성 요소 기능은 한 번 실행하는 일반 JavaScript입니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Website • Docs • Tutorial • Playground • Discord
Solid is a declarative JavaScript library for building user interfaces. Instead of a Virtual DOM, it compiles templates to real DOM nodes and updates them with fine-grained reactivity. Declare your state and use it throughout your app — when a piece of state changes, only the code that depends on it re-runs.
At a glance
import { createSignal } from "solid-js";
import { render } from "@solidjs/web";
function Counter() {
const [count, setCount] = createSignal(0);
const doubled = () => count() * 2;
// The component body runs once. Only `{doubled()}` updates when count changes.
return setCount(c => c + 1)}>{doubled()};
}
render(() => , document.getElementById("app")!);
Try it in our Playground.
Solid compiles your JSX to real DOM operations at build time. The component function runs once on mount; reactivity is per-expression, not per-render. The {doubled()} expression compiles to a tracked update that only touches that one DOM position when count() changes.
import { template, delegateEvents, insert } from "@solidjs/web";
import { createSignal } from "solid-js";
const _tmpl$ = /*#__PURE__*/ template(``);
function Counter() {
const [count, setCount] = createSignal(0);
const doubled = () => count() * 2;
return (() => {
const _el$ = _tmpl$();
_el$._$$click = () => setCount(c => c + 1);
insert(_el$, doubled);
return _el$;
})();
}
delegateEvents(["click"]);
Reads update on the next microtask (or call flush() for synchronous interop). Effects are split into a tracking compute phase and a side-effecting apply phase — see the docs for the full model.
추천 도구
다른 키워드를 입력하거나 필터를 제거해 보세요.
설치
npx skillfish add solidjs/solid