Skip to main content
تشغيل أي مهارة في Manus
بنقرة واحدة

solid-context

النجوم٢
التفرعات٢
آخر تحديث١٦ يونيو ٢٠٢٦ في ١٨:٠٣

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.

التثبيت

التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.

SKILL.md
readonly