Skip to content
Back to skills

Solidjs Knowledge Patch

ASecurity

SolidJS

  • 25 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added May 27, 2026
developmenttypescriptgoreactexpressapifrontend

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 6 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill solidjs-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Solidjs Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Solidjs Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-solidjs-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-solidjs-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: solidjs-knowledge-patch
description: SolidJS
version: null
license: MIT
metadata:
  author: Nevaberry
---


# SolidJS knowledge patch

Load this skill for compatibility work involving Solid, Solid Router, or SolidStart.
Use the quick reference below for migration decisions and the topic references for complete guidance and examples.

> [!CAUTION]
> Guidance marked prerelease may change before stable release.

## Topic references

| Reference | Topics |
| --- | --- |
| [Migration, JSX, and DOM APIs](references/migration-and-ui.md) | Removed APIs, package resolution, JSX types and bindings, events, SSR, hydration, compiler frontends, custom renderers |
| [Reactivity and Async Data](references/reactivity-and-async.md) | Effects, tracked reads, async computations, resources, external producers, scheduling, development attribution |
| [Routing and SolidStart](references/routing-and-solidstart.md) | Build and deployment configuration, file routes, navigation, URL parameters, server functions, request context |
| [Stores, Actions, and Submissions](references/stores-and-actions.md) | Store wrapping, async derives, optimistic state, action submissions, form bodies, revalidation |

## Breaking changes and deprecations

### Solid migration and scaffolding

Solid 2 removes `createResource`, `batch`, `startTransition`, `on`, `produce`, `createComputed`, and `createMutable`.
Update imports and call sites when migrating from 1.x.
Run the first command to scaffold a Solid 2 project; use the second to stay on the Solid 1 release line.

```sh
npm create solid@latest
npm install solid-js@v1-latest
```

### Package resolution and server imports

Solid 1.9.0 removed the legacy package `browser` field.
Bundlers that rely 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 so shared modules can import them during SSR builds; calling those helpers on the server throws.

### Callable JSX children

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`.

### Capturing non-delegated events

With `on:`, pass a listener object with `handleEvent` and options such as `once`, `passive`, or `capture`.
Use `capture: true` in place of the deprecated `oncapture:` directive.

```tsx
<button on:click={{
  handleEvent(event) {
    console.log(event.type);
  },
  capture: true,
  once: true,
}}>
  Save
</button>
```

### SolidStart imports and build setup

From SolidStart 1.1, import `getServerFunctionMeta` from `@solidjs/start`; the export from `@solidjs/start/server` is deprecated.
SolidStart 1.1 switched to the TanStack server-functions plugin in a breaking upgrade and returns HTTP 404 for an unknown server function.
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.

### Effect callback contract

> **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));
```

## JSX and hydration

### Explicit boolean attributes

Use `bool:` to force boolean attribute semantics: truthy values set the attribute to the empty string, and falsy values remove it.

```tsx
<my-element bool:enable={isEnabled()} />
```

### Non-keyed callback lifetimes

In Solid 1.7, non-keyed `<Show>` and `<Match>` callbacks receive a narrowed accessor that throws if called after the condition becomes falsy.
Deferred callbacks that can outlive the branch should read the original signal.

### Initial hydration and compiler compatibility

Solid 1.8 preserves server-rendered DOM attributes and properties during initial hydration even if a binding computes a different browser value.
Account for this when bindings depend on browser-only state.
Keep the Solid runtime and JSX compiler versions 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.

### Existing resource data during SSR

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 the resource can continue fetching on subsequent source changes.

```ts
const [user] = createResource(userId, fetchUser, {
  initialValue: initialUser,
  ssrLoadFrom: "initial",
});
```

### Independent hydration roots

In Solid 1.3, give independently rendered roots unique `renderId` values and reuse each ID during hydration.
Include a single `<HydrationScript />` on the page.

```tsx
const html = renderToString(() => <Island />, { renderId: "island" });
hydrate(() => <Island />, mount, { renderId: "island" });
```

### Experimental TSRX frontend

> **Prerelease (`solidjs-solid-releases-current`):** This guidance may change before stable release.

Set `syntax` to `"auto"` to select TSRX for `.tsrx` files, or choose `"jsx"` or `"tsrx"` explicitly.
Babel needs the optional `@tsrx/core` peer dependency for TSRX; the native compiler enables its `tsrx` Cargo feature by default.
Solid rejects authored `&{}` and `&[]` lazy destructuring in both frontends.
See the compiler reference for control flow, generated deferred bindings, scoped styles, and editor type checking.

## Async data, stores, and actions

### Async computations and tracked reads

A reactive computation can return a promise or async iterator; Solid handles races and makes the result available downstream through the reactive graph.
To fix `STRICT_READ_UNTRACKED`, move the tracked read to the JSX expression or reactive callback that uses the value.
Reserve top-level `untrack` for intentional one-time snapshots of values with no async dependencies, since async-derived values can be pending or mid-transition.

### Optimistic state

Writes through `createOptimistic` or `createOptimisticStore` revert when the action settles, including on success.
Refresh or write the source of truth to retain the result.

### Store wrapping

From Solid 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.

### Router data refresh

From Router 0.16.2, `revalidate(key)` forces a cache miss synchronously, so an immediately following `refetch()` can fetch fresh data without awaiting the revalidation transition.
A `createAsync` callback can receive the previous resolved value; read `data.latest` to keep rendering it while a new result is pending.
The `json` helper forwards `revalidate`; from Router 0.14.9, an empty array or empty string opts out of revalidation.

```ts
return json({ saved: true }, { revalidate: [] });
```

### Form bodies and bound actions

Router forms default to URL encoding; an action can accept `URLSearchParams` for that encoding as of 0.15.4.
Use `enctype="multipart/form-data"` when the action needs `FormData`, such as for a file upload.
To follow an action bound with `.with(...)`, pass the bound action to `useSubmission`.
From Router 0.15.2, navigation clears completed submissions while preserving pending ones.

## Routing and server functions

### Generated file routes

Call `FileRoutes()` from `@solidjs/start/router` directly to get SolidStart's generated configuration for your chosen router.
In SolidStart 1.0, export `route` from a filesystem route module to supply router options such as `load` and `matchFilters`.
SolidStart lazy-wraps the default export and sets it as the route's `component`.
Parenthesized parts of filesystem route names are omitted from URL matching while retaining their effect on the route tree.

### Suspense around file-routed pages

Wrap the root layout's children in `<Suspense>` to avoid hydration errors when using `<FileRoutes />`.
Its generated router config contains UI routes only.

```tsx
<Router root={props => <Suspense>{props.children}</Suspense>}>
  <FileRoutes />
</Router>
```

### URL parameters and navigation

Search parameter arrays represent repeated keys, such as `?tag=solid&tag=router`.
From Router 0.16.2, consecutive synchronous `setSearchParams` calls merge into the pending destination.
In that release, `useBeforeLeave` listeners can inspect `event.defaultPrevented`, and the accessor returned by `useCurrentMatches()` returns a copy whose mutation does not affect router state.
Enable `scrollRestoration` to let the browser router manage history-entry scroll positions, including across reloads.
Router 1.0 restores the saved offset once after navigation settles; content that grows later leaves the viewport at the position the document could reach at that point.

### Recognizing server-function responses

> **Prerelease (`solidjs-solid-releases-current`):** This guidance may change before stable release.

A 2xx response must carry the transport's body-format tag or its verbatim-passthrough marker.
An untagged success, such as HTML from an incorrect proxy route, rejects the call.

Files in this skill

  • SKILL.md6 KB
  • references/async-actions.md4.5 KB
  • references/control-flow-dom.md4.2 KB
  • references/reactivity-effects.md4.5 KB
  • references/solidstart.md3.5 KB
  • references/stores.md3.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.