Start
silmaril
silmaril
Compile-time reactivity for plain JS and TS.
$$ defines a reactive boundary. A variable declared inside it is reactive when it is written, reads another reactive variable or binds a store. $ reacts when such a variable changes. The compiler works out which code reads which variable, so a write runs only the code that reads the written variable.
No logs.
Features
- Compile-time reactivity.
silmaril/compilerfinds the reactive variables and the code that reads them. - Static reactive graph. A write runs only the code that reads the written variable.
- Minimal runtime.
silmarilhas no dependencies and ships less than 1.5 kB gzipped. - Auto-memoization. A computed variable runs again only when a variable it reads changes.
- Stores.
$storebinds any store withgetandsubscribeto a variable.
Where to go next
- Getting started installs the package and runs a first example.
- Bundler setup adds the compiler to Vite, Rollup, webpack and others.
- Basic reactivity starts the concepts. Computed variables, lifecycles, synchronous tracking and composition follow it.
- Stores and SolidJS connect reactive code with the rest of an app.
- API reference lists every export, errors lists every message, and the glossary defines the terms.
- Troubleshooting and limits help when code does not run. Migrating from 0.4 lists what changed.
- Internals explains how the compiler and the runtime work.