Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Solidjs Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-solidjs-knowledge-patch-nevaberry-plugins)
---
name: solidjs-knowledge-patch
description: SolidJS
version: null
license: MIT
metadata:
author: Nevaberry
---
# SolidJS Knowledge Patch
Load this skill when migrating Solid applications or working with JSX,
reactivity, SSR, stores, Solid Router, or SolidStart. Use the topic references
for complete guidance and examples; the sections below highlight common tasks.
> [!CAUTION]
> Prerelease guidance may change before stable release. Affected items carry
> a prerelease marker beside their guidance.
## Topic references
| Reference | Topics |
| --- | --- |
| [Migration and UI](references/migration-and-ui.md) | Removed APIs, package exports, JSX types, DOM bindings, events, custom renderers, TSRX, development reloads |
| [Reactivity and async](references/reactivity-and-async.md) | Effects, async computations, resources, external producers, SSR, hydration, errors, diagnostics |
| [Routing and SolidStart](references/routing-and-solidstart.md) | Vite, deployment, filesystem routes, navigation, API routes, request locals, server functions, transport |
| [Stores and actions](references/stores-and-actions.md) | Store wrapping, optimistic updates, projections, submissions, form bodies, revalidation |
## Migration and deprecations
### Removed APIs and project setup
Solid 2 removes `createResource`, `batch`, `startTransition`, `on`, `produce`,
`createComputed`, and `createMutable`. Update imports and call sites when
migrating from 1.x.
Run `npm create solid@latest` to scaffold a Solid 2 project. Use
`npm install solid-js@v1-latest` to stay on the Solid 1 release line.
### Effect callback signature
> **Prerelease (`solidjs-solid-releases-current`):** This guidance may change before stable release.
TypeScript requires a separate effect callback. Move tracked reads into the
first callback and the side effect into the second.
```ts
createEffect(() => count(), value => console.log(value));
```
### Package resolution and SSR imports
Solid removed the legacy `browser` package field. Bundlers relying on it may
need an upgrade to resolve the client build through package export conditions.
The server build of `solid-js/web` exports client-only helpers for shared
imports during SSR builds; calling those helpers on the server throws.
Library authors can expose JSX source with the `solid` export condition.
Place it ahead of the browser or default build so the consumer's compiler can
compile the source for its render target.
### Deprecated event and server-function APIs
Use `capture: true` on an `on:` listener object in place of deprecated
`oncapture:`. The object defines `handleEvent` and can supply options such as
`once`, `passive`, or `capture`.
From SolidStart 1.1, import `getServerFunctionMeta` from `@solidjs/start`;
its export from `@solidjs/start/server` is deprecated.
### Tooling and router alignment
SolidStart 2.0.0 supports Solid v1 applications and replaces Vinxi with Vite 8's
Environment API, powered by Rolldown. Deployment plugins integrate directly
with the Vite setup. SolidStart 1.1 adds Vite 6 support.
Router 1.0 is a nonbreaking version realignment from 0.16. Use Router 1.x with
Solid 1.x and SolidStart 2.0. For Solid 2, the router's `next` tag moves from
`1.0.0-next.*` to `2.0.0-next.*`.
## Reactive reads and async data
A reactive computation can return a promise or async iterator. Solid handles
races and makes the async result available downstream through the reactive graph.
For `STRICT_READ_UNTRACKED`, move the tracked read to the JSX expression or
reactive callback that uses it. Reserve top-level `untrack` for intentional
one-time snapshots of values with no async dependencies: async-derived values
can be pending or mid-transition.
In Solid 1.7, non-keyed `<Show>` and `<Match>` callbacks receive a narrowed
accessor that throws after the condition becomes falsy. Deferred callbacks
that can outlive the branch should read the original signal.
Solid 1.7 moved callable children out of `JSX.Element`. Call accessors in JSX
with `{count()}` and explicitly type render props, for example
`children: (item: Item) => JSX.Element`.
A `createAsync` callback can receive the previous resolved value. Read
`data.latest` to keep rendering that value while a new result is pending.
### Existing data in Solid 1 resources
In Solid 1.5, `ssrLoadFrom: "initial"` uses the supplied `initialValue` during
SSR and hydration, skipping the initial fetch and resource serialization.
Supply the value on both sides so subsequent source changes can keep fetching.
Starting in Solid 1.4, `refetch()` uses the last tracked source value; update
a reactive source dependency to change the key used by the fetcher.
## Stores and optimistic actions
Writes through `createOptimistic` or `createOptimisticStore` revert when the
action settles, including on success. Refresh or write the source of truth
to retain the result.
From 2.0.1, stores wrap and track frozen plain objects and arrays at the same
granularity as unfrozen values. Use `createStore(value, { shallow: true })`
to keep nested values plain.
From 2.0.3, `markRaw(MyClass)` from `solid-js` keeps instances of the class
and its subclasses out of store wrapping. Use it for objects with private
fields or their own subscriptions.
In 2.0.4, `createProjection` or derived `createOptimisticStore` callbacks can
return a pending async store directly. SSR waits for it, allowing `<Loading>`
to show its fallback and stream the result once ready.
### Action submissions and revalidation
Router forms default to URL encoding; actions can accept `URLSearchParams`
for that encoding as of 0.15.4. Use `enctype="multipart/form-data"` when an
action needs `FormData`, such as for a file upload.
Actions gained `onComplete` in 0.15. From 0.15.2, navigation clears completed
submissions while preserving pending ones. Pass an action bound with
`.with(...)` to `useSubmission` to follow that bound action.
From 0.16.2, `revalidate(key)` forces a cache miss synchronously, so an
immediately following `refetch()` can fetch fresh data without awaiting the
revalidation transition. The `json` helper forwards `revalidate`; from
0.14.9, an empty array or empty string opts out of revalidation.
## File routes and navigation
Call `FileRoutes()` from `@solidjs/start/router` directly to get SolidStart's
generated router configuration. It contains UI routes only. Wrap the root
layout's children in `<Suspense>` to avoid hydration errors with `<FileRoutes />`.
Parenthesized parts of filesystem route names are omitted from URL matching
while retaining their effect on the route tree. `src/routes/users/[[id]].tsx`
matches `/users` and `/users/42`; `src/routes/blog/[...post].tsx` captures
remaining segments as one slash-delimited string.
Use `src/routes/blog.tsx` for a shared layout around `src/routes/blog/`, with
the active child at `props.children`. `src/routes/blog/index.tsx` is the index
page at `/blog`.
From 0.16.2, synchronous `setSearchParams` calls merge into the pending
destination. Doubled-slash paths such as `//dash` go to the not-found state;
a single trailing slash still matches.
Enable `scrollRestoration` for history-entry scroll positions, including
across reloads. Router 1.0 restores the saved offset once after navigation
settles; later content growth leaves the viewport at the position the document
could reach at that point.
## SSR and hydration
Keep the Solid runtime and JSX compiler aligned when upgrading SSR to 1.8.
The opening hydration comment uses `$` because servers with Server Side
Includes can interpret comments beginning with `#` as directives.
Solid 1.8 preserves server-rendered attributes and properties during initial
hydration even if browser bindings compute different values. Account for
browser-only state in bindings. Streamed SSR data can contain nested promises.
In Solid 1.3, assign each independently rendered root a unique `renderId`
and use the same ID when hydrating. Include one `<HydrationScript />` on
the page. Solid 1.8 also guards the inline script against duplicate
initialization when independently rendered fragments each include it.
Use `renderToStream(() => <App />).pipe(response)` in place of
`pipeToNodeWritable`, and `.pipeTo(writable)` in place of `pipeToWritable`
for a Web writable stream. In Solid 1.3, `onCompleteShell` and
`onCompleteAll` run when the shell and full render finish, respectively.
## JSX and rendering frontends
Use `bool:` to force boolean attribute semantics: truthy sets an empty
attribute and falsy removes it. Solid 1.7 supports `attr:` and `prop:` keys
in DOM JSX spreads.
Solid 1.6 merges native JSX props in order, even when a spread source changes
shape or is replaced. An earlier binding can take effect again when the later
spread drops its key. Stable plain props objects can be spread without `Proxy`;
stores and replaceable spread sources such as `{...getProps()}` still require it.
### Experimental TSRX frontend
> **Prerelease (`solidjs-solid-releases-current`):** This guidance may change before stable release.
Set `syntax: "auto"` to select TSRX for `.tsrx` files, or choose `"jsx"` or
`"tsrx"` explicitly. Babel needs the optional `@tsrx/core` peer dependency;
the native compiler enables its `tsrx` Cargo feature by default.
## Server functions
Client calls to `"use server"` functions can receive serialized async
iterables, streams, and promises. Use `live()` to stream server functions
over a persistent connection.
After a mutation, Solid Router can start loading the redirect destination's
data on the server and stream it in the mutation response while the client
follows the redirect.
### Preserving transport headers
> **Prerelease (`solidjs-solid-releases-current`):** This guidance may change before stable release.
In `prepareRequest`, build on the supplied request init and preserve transport
headers when adding headers such as authorization. An invalid return fails at
the call site. A hook can deliberately replace the body or signal while
preserving transport headers.