Skip to main content
Jeden Skill in Manus ausführen
mit einem Klick

solid-context

Sterne2
Forks2
Aktualisiert16. Juni 2026 um 18:03

Use this skill when sharing data across a Solid (SolidJS) component tree without prop drilling: theme, current user, i18n, design-system tokens, anything that many components in a subtree need. Covers `createContext` (with optional default value to avoid `| undefined`), `<MyContext.Provider value={...}>` to scope the data, `useContext` to read it (returns the default if no Provider, or `undefined` if no default), the standard pattern of putting **signals or stores** into context (not raw values, so consumers see updates), custom Provider components for ergonomics, custom `useMyContext()` hooks that throw on missing Provider for crisp error messages, typing context with `ReturnType<typeof factoryFn>`, and the rule that components above a Provider don't see its value. Triggers on: createContext, useContext, Provider, context API, prop drilling, theme, current user, i18n, shared state, useMyContext, custom hook.

Installation

Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.

SKILL.md
readonly