solid / rules
Cursor rule37k starsChanged 12 days agoMITView on GitHub
Web platform runtime — rendering, SSR, Portal, Dynamic
Trending
More talk lately.about the whole repository
Who's talking about solidjs/solid
- Fireship“Solid in 100 Seconds”YouTube · May 16, 2022 · 810k views
- Kendo UI“Let’s Learn Solid JS | React Wednesdays”YouTube · Aug 12, 2021 · 8.6k views
- Unlearning Labs“🤯 SolidJS 2.0, the full course - Season 1🧪”YouTube · Nov 22, 2026 · 222 views
- Git Hype“solidjs/solid - A declarative, efficient, and flexible JavaScript library for building user…”YouTube · Nov 21, 2026 · 155 views
- microsoft/TypeScript“'identity' modifier to indicate a function's parameter-less returns should be narrowed like a value”GitHub · Jan 10, 2025 · 136 reactions
The biggest 5 of 21 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 21
Talked about on YouTube, Hacker News, GitHub and Bluesky (21 times).
On YouTube · 7
- May 16, 2022Solid in 100 Seconds — Fireship810k views · 1.1k comments
- Aug 12, 2021Let’s Learn Solid JS | React Wednesdays — Kendo UI8.6k views · 12 comments
- Nov 22, 2026🤯 SolidJS 2.0, the full course - Season 1🧪 — Unlearning Labs - There is no limit to learning222 views · 5 comments
- Nov 21, 2026solidjs/solid - A declarative, efficient, and flexible JavaScript library for building user… — Git Hype155 views
- Nov 19, 2026GitHub - solidjs/solid: A declarative, efficient, and flexible JavaScript library for building us... — GitHub Daily Trend AI Podcast134 views
2 more on YouTube
- Nov 23, 2026solidjs/solid - A declarative, efficient, and flexible JavaScript library for building user… — Git Chamber63 views
- Nov 18, 2026Solid skips the virtual DOM entirely and updates only what actually changed — GitHub Now49 views
On Hacker News · 5
- Aug 13, 2026Solid 2.0 RC: The Big <Reveal>10 points
- Oct 20, 2022Solid 1.6 – Castle in the Sky4 points
- Mar 4, 2026Solidjs releases 2.0 beta – The <Suspense> is Over3 points · 1 comment
- Aug 27, 2022Solid JS v1.5.03 points · 1 comment
- Aug 15, 2021SolidJS v1.1.01 point
On GitHub · 5
- Jan 10, 2025'identity' modifier to indicate a function's parameter-less returns should be narrowed like a value — microsoft/TypeScript136 reactions · 40 comments
- Dec 28, 2024Begin `solid-router` and `router-core` — TanStack/router22 reactions · 4 comments
- Sep 17, 2023Support writing custom renderers to use leptos anywhere — leptos-rs/leptos7 reactions · 8 comments
- Nov 11, 2024handle moving nodes — ryansolid/dom-expressions4 reactions · 5 comments
- Nov 2, 2024update types for attributes and properties — ryansolid/dom-expressions4 reactions · 20 comments
On Bluesky · 4
- Nov 7, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 solidjs / solid ⭐ 36,261 (+139) 🗒 TypeScript A declarative, efficient, and flexible JavaScript library… — @github-trending-js.bsky.social2 likes and reposts
- Nov 19, 2026📦 solidjs / solid ⭐ 36,334 (+37) 🗒 TypeScript A declarative, efficient, and flexible JavaScript library for building user interfaces. — @github-trending-js.bsky.social1 likes and repost
- Mar 5, 2026Beta of new v2 for SolidJS. Exciting to try it out. github.com/solidjs/solid — @jqubi.bsky.social1 likes and repost
- Apr 11, 2025At a high level, how would you compare Preact to Solid [1], Inertia [2], and Ember [3]? [1] github.com/solidjs/solid [2]… — @nezteb.net0 likes and reposts · 2 replies
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/signals.mdcCursor rule
- .cursor/rules/solid-core.mdcCursor rule
- .cursor/rules/testing-patterns.mdcCursor rule
The file
Files
--- description: Web platform runtime — rendering, SSR, Portal, Dynamic globs: packages/web/** alwaysApply: false --- # Solid Web (`@solidjs/web`) ## Package Role Web-specific runtime providing DOM rendering, hydration, SSR methods, DOM operations, and web-only components. Has conditional exports: browser gets `dist/web.js`, server environments get `dist/server.js`. ## Client Entry (`src/index.ts`) Re-exports everything from `client.js`: `render`, `hydrate`, `insert`, `spread`, `template`, `delegateEvents`, `getNextElement`, `setProperty`, `setAttribute`, `className`, `style`, `addEvent`, `useHead`, `getRequestEvent`, `getHydrationWriter`, `takeHydrationValue`, `getTraceContext`, the cookie codec, the server-function registry (`isServerFunction`, `getServerFunctionMetadata`, `getServerFunctionRPC`), element claims (`registerElementClaim`, `claimElement`, `claimElementTree`), and the DOM constant sets (`SVGElements`, `MathMLElements`, `DelegatedEvents`, …). Also re-exports `server-mock.js` (see below) and `response.js` (`redirect`, `reload`, `respond`, `markSafeError`, …). Additional exports: - `Portal`, `Dynamic`, `dynamic`, `dynamicComponent`, `clientOnly` - `httpStatus`, `httpHeader` (no-ops on the client) - Flow controls re-exported from `solid-js`: `For`, `Show`, `Switch`, `Match`, `Errored`, `Loading`, `Repeat`, `Reveal`, `NoHydration`, `Hydration` - `isServer: false`, `isDev: boolean` (`_SOLID_DEV_`) ## Server Entry (`src/index.server.ts`) Re-exports everything from `server.js` and `response.js`: - `renderToString`, `renderToStream` (there is no `renderToStringAsync` — `renderToString` awaits async) - SSR helpers: `ssr`, `ssrElement`, `ssrElementAttribute`, `ssrAttribute`, `ssrClassName`, `ssrStyle`, `ssrStyleProperty`, `ssrStyleProperties`, `ssrGroup`, `ssrHydrationKey`, `ssrLinkClaim`, `ssrSelectValues`, `resolveSSRNode`, `escape` - Request/response: `getRequestEvent`, `createRequestEvent`, `createResponseStub`, `createSSRResponse`, `commitEventResponse`, `composeMiddleware`, `configureServerErrors`, `reportRequestFailure`, plus `redirect`, `reload`, `respond` and the cookie codec - Hydration: `HydrationScript`, `generateHydrationScript`, `getHydrationWriter`, `takeHydrationValue`, `useHead` - The client-only DOM APIs (`render`, `hydrate`, `insert`, `spread`, `template`, `delegateEvents`, …) are exported as a `notSup` stub that throws when called on the server Additional: - Simplified `Dynamic`/`dynamic` (no memoization — server is stateless), `dynamicComponent` - `Portal` throws error (not supported server-side) - `clientOnly` (server half: renders the fallback, emits preload hints) - `httpStatus`, `httpHeader` (declare status/headers on the current request event) - Same flow-control re-exports from `solid-js` as the client entry - `isServer: true`, `isDev: boolean` (`_SOLID_DEV_`; the server has a dev build too, `dist/server.dev.js`) - Request-event scoping (`provideRequestEvent`, `AsyncLocalStorage`-backed) lives in `@solidjs/web/storage`, not in this entry ## Portal Component Renders children to a different DOM location (defaults to `document.body`). - Uses text markers (`treeMarker`, `startMarker`, `endMarker`) for tracking - Creates element proxy to track `_$host` property - SVG-aware - Cleanup removes all nodes between markers ## Dynamic Component Renders components or elements dynamically based on `component` prop. - `createMemo` caches the component reference - Handles: function components, string tags (HTML/SVG via `SVGElements` set), undefined - Hydration-aware via `sharedConfig.hydrating` and `getNextElement()` - Uses `spread()` to apply props to native elements ## Submodules (each with its own export path and source directory) - **`server-functions/`** (`./server-functions`, `/server`, `/client`, `/rich-args`) — the server-function runtime: request-event scoping (`provideEvent`), invocation wrapping, argument/result (de)serialization over seroval, failure sanitization on the result walk, request body caps, and the encrypted flash-cookie mechanism for no-JS form flows (AES-GCM, key derived via HKDF from the bundler-injected `globalThis.__SOLID_SECRET__`, domain-separated). The conformance matrix and pinned rulings live in `test/server/server-function-matrix/MATRIX.md` — consult it before changing semantics; add rulings there when making them. - **`frames/`** (`./frames`, `/server`, `/client`) — frames transport: eager client consumer + transport with a lazily-loaded codec. - **`serialization/`** (`./serialization`, `./serialization/decode`) — the seroval-based streaming codec shared by server functions and frames; the decoder owns promise lifecycle (every deferred it creates must be owned/defused — see the #3235/#3267 rulings in the matrix). - **`storage/`** (`./storage`) — persisted storage helpers over `seroval`/`seroval-plugins`. ## Server-Mock (`src/server-mock.ts`) Browser-safe stubs that log errors if server APIs are accidentally used in browser: `renderToString`, `renderToStringAsync`, `renderToStream`, SSR helpers. ## Build Outputs - `dist/web.js` — production browser - `dist/web.observe.js` — observe-tier browser (`observe` export condition; `_SOLID_OBSERVE_` on, `_SOLID_DEV_` off — interaction provenance wiring kept, checks folded) - `dist/web.dev.js` — development browser (both flags on) - `dist/server.js` — production server (Node/Deno/Worker) - `dist/server.dev.js` — development server (`development` export condition, nested under `node`/`worker`/`deno`) Every dev artifact is `<entry>.dev.js` beside its prod `<entry>.js` — the same rule for `frames/`, `server-functions/`, and the other packages. All artifacts are ESM only (no `.cjs` twins, no `require` export branch, no `types-cjs/`): the published `engines.node >= 22.12` floor `require()`s ESM natively, so a CJS host resolves the same files through the same conditions. Nothing shipped may contain a top-level `await` (`require(esm)` throws on it; the signals dist test scans for it). Observe artifacts are `<entry>.observe.js` and exist only for entries that contain wiring (here: the browser entry); entries without wiring fall through to prod under `observe`. Tier-ness is a build mode, not an entry. Gate a site on `"_SOLID_OBSERVE_"` when production observability needs it (labels, attribution hooks), on `"_SOLID_DEV_"` when only a developer at a console does. See `documentation/archive/plans/observe-tier-plan.md`. Rollup with Babel for JSX transformation, `@rollup/plugin-replace` for dev/prod flags.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

