solidjs-v2listed
Install: claude install-skill khmm12/solidjs-v2-skills
# SolidJS 2.0
Solid 2.0 is **not React** and **not Solid 1.x**. Both priors are the dominant
bug sources in generated code. When in doubt, distrust pattern-matching and
check `references/cheatsheet.md` (official, ships with the package) or the
installed typings in `node_modules`.
## Step 0 — confirm this is actually a v2 project
Check before applying anything below:
- `package.json`: `solid-js` major is `2` (e.g. `2.0.0-beta.x`), and/or
`@solidjs/web` is a dependency.
- `tsconfig.json`: `"jsxImportSource": "@solidjs/web"`.
If `solid-js` is `1.x` (imports like `solid-js/web`, `solid-js/store`), **stop —
these rules do not apply**; that's a Solid 1.x project. If the task is to
convert it, use the `solidjs-v2-migration` skill instead.
Betas drift: when docs and the installed package disagree, trust the typings in
`node_modules` (`solid-js`, `@solidjs/web`, `@solidjs/signals`).
## The ten rules that prevent most bugs
1. **Reads lag writes.** Updates apply on the next microtask:
`setCount(1); count()` still returns `0`. Synchronous point: `flush()`.
`batch()` does not exist.
2. **`createEffect` takes two functions** — `(compute, apply, options?)`.
Compute tracks and returns a value; apply does side effects (untracked) and
may return a cleanup. The 1.x single-callback form throws. `on()`,
`createComputed`, initial-value args: all gone.
3. **Never write signals/stores inside a reactive scope** (memo, compute,
component body) — throws in dev. Write in even