solid-js
solid-js is the reactive core.
It has no knowledge of the DOM; the same primitives run in the browser, on the server, and in tests.
Rendering functions live in @solidjs/web.
Every export here is imported from "solid-js":
import { createSignal, createMemo, createStore, Show, For } from "solid-js";Reactivity
Values that change over time and the computations that follow them. Reactivity explains the model.
createSignalcreates a readable, writable value.createMemoderives a cached value from other reactive reads, including async ones.createEffectruns side effects after tracked values change.createOptimisticcreates a signal whose writes inside an action are tentative.isPendingreports that a new answer is on the way;latestreads it early.untrackreads without subscribing;flushdrains the update queue now.
Stores
Nested reactive state with per-property tracking. Stores covers drafts, projections, and optimistic stores.
createStorewraps an object or array; the setter receives a draft.createProjectionderives a read-only store from other reactive reads.createOptimisticStoreis the store form ofcreateOptimistic.reconcilemerges new data into a store by key.mergeandomitcombine and split props without losing reactivity.
Lifecycle and actions
Coordinating async work and the moments around it. Async reactivity is the concept page.
actionruns a mutation whose writes commit together.onSettledruns once after the current owner's pending work has finished, and can return a cleanup.refreshre-asks an async source;affectsmarks values as pending while it does.untilawaits a reactive condition.
Components and context
createContextanduseContextshare a value with a subtree.childrenresolvesprops.childrenfor inspection.lazycode-splits a component.createUniqueIdgenerates ids that match between server and client.
Flow components
Built-in components for conditions, lists, and boundaries. Components and JSX and Boundaries show them in use.
Showrenders content when a condition holds.SwitchandMatchpick the first matching branch.Forrenders a row per array item;Repeatrenders a row per index.Loadingshows a fallback while async reads have no value.Erroredrenders a fallback when the subtree throws.Revealorders how siblingLoadingboundaries appear.
Advanced
Owner introspection, specialized effects, store internals, list primitives, manual hydration, interop, and development hooks. These pages support libraries and tooling; application code rarely needs them.
createRoot,getOwner, andrunWithOwnermanage reactive scopes by hand.createRenderEffectandonCleanupserve renderers and custom primitives.mapArrayandrepeatare the list primitives behindForandRepeat.isHydratingsays whether the running code is claiming server-rendered DOM;isHydratablewhether the owner sits where hydration applies.DEVexposes the development diagnostics that Debugging reactivity reads.
Types
- Reactive types:
Accessor,Setter,Signal - Store types:
Store - Component types:
Component,ParentProps,ValidComponent, and friends - Context types and
Owner JSX:JSX.Elementand the intrinsic element attributes