# SolidJS — Simple & Performant Reactive UI Framework > SolidJS is a declarative JavaScript library for building user interfaces. Fine-grained reactivity, no virtual DOM, and performance that rivals vanilla JS. React-like syntax, 10x faster. ## Install Save in your project root: ## Quick Use ```bash # Create a new Solid project npx degit solidjs/templates/ts my-app cd my-app npm install npm run dev # Or with Solid Start (meta framework) npm create solid@latest my-app ``` ## Intro **SolidJS** is a declarative, efficient, and flexible JavaScript library for building user interfaces. It uses React-like JSX syntax but with a completely different runtime model based on fine-grained reactivity (like Svelte) instead of a virtual DOM. The result is performance that consistently ranks among the fastest frameworks in industry benchmarks, often indistinguishable from vanilla JavaScript. With 35.4K+ GitHub stars and MIT license, SolidJS has become the go-to framework for developers who want React's developer experience with dramatically better runtime performance. ## What SolidJS Does - **Fine-Grained Reactivity**: Updates exact DOM nodes instead of re-rendering components - **No Virtual DOM**: Compiled templates, direct DOM manipulation - **React-like JSX**: Familiar syntax for React developers - **Signals**: Primitive reactive state management built-in - **SSR & SSG**: Server-side rendering and static generation via Solid Start - **Small Bundle**: Core library is ~7KB gzipped - **TypeScript First**: Excellent type inference - **Progressive**: Use as a library or full meta-framework - **Stores**: Built-in nested reactive stores - **Context**: Dependency injection without re-renders ## Architecture Difference ``` React: Component re-renders → Virtual DOM diff → DOM update (Whole component function runs on every change) Solid: Signal changes → Specific DOM node updates (Component function runs ONCE, only reactive parts update) ``` This means in Solid, your component code runs once at mount, and only the specific reactive expressions update on state changes. ## Basic Example ### Counter ```jsx import { createSignal } from "solid-js"; function Counter() { const [count, setCount] = createSignal(0); // This console.log runs ONCE (at mount), not on every re-render console.log("Counter component setup"); return (

Count: {count()}

); } ``` Note: `count()` is called as a function (it's a getter). This is what enables Solid to track dependencies. ### Derived State ```jsx import { createSignal, createMemo } from "solid-js"; function PriceCalculator() { const [price, setPrice] = createSignal(100); const [quantity, setQuantity] = createSignal(1); // Memo only recomputes when price or quantity changes const total = createMemo(() => price() * quantity()); return (
setPrice(+e.currentTarget.value)} /> setQuantity(+e.currentTarget.value)} />

Total: ${total()}

); } ``` ### Effects ```jsx import { createSignal, createEffect } from "solid-js"; function AutoSave() { const [text, setText] = createSignal(""); createEffect(() => { // Runs whenever text() changes localStorage.setItem("draft", text()); console.log("Saved:", text()); }); return (