solidjs-state

Guide SolidJS state management across signals, stores, and context.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/gregoryraymond/claude-agents-and-skills --skill solidjs-state
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solidjs-state
Source: https://github.com/gregoryraymond/claude-agents-and-skills/tree/main/skills/solidjs-state
Command: npx skills add https://github.com/gregoryraymond/claude-agents-and-skills --skill solidjs-state

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing state in SolidJS across components requires choosing the right primitive (signal, store, context) and deciding when to lift state or share it via Context or Resource.

Core Features & Use Cases

  • State system guidance for choosing between createSignal, createStore, createResource, createAsync, and Context.
  • Patterns for Context providers and useX hooks to avoid prop drilling.
  • Guidance on when to use resource-based data loading and server interactions in SolidStart and SolidRouter.
  • Practical examples for local vs global state, and safe state updates with produce and reconcile.

Quick Start

Construct a minimal SolidJS state solution by selecting the correct primitive (signal, store, or context) for the given data and implementing it following the patterns described above.

Frequently Asked Questions about solidjs-state

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between createSignal and createStore for SolidJS state management?

createSignal manages primitive SolidJS state values, while createStore handles nested objects and arrays with fine-grained reactivity. Choose signals for local independent data and stores for structured cross-cutting state requiring targeted property updates.

What is the best way to avoid prop drilling in SolidJS components?

The best way to avoid prop drilling in SolidJS is by using Context. Create a Context Provider to share state globally across the component tree, and access it via custom useX hooks to cleanly retrieve data without passing props manually.

When should I use createResource or createAsync for data fetching in SolidJS?

Use createResource or createAsync for SolidJS data fetching when loading server data asynchronously. These primitives handle remote interactions and server data fetching in SolidStart and SolidRouter, managing loading states and memoized updates predictably.

How do I safely update nested SolidJS stores using produce and reconcile?

Safely update nested SolidJS stores by applying produce for immutable-style mutable drafts or reconcile to diff and sync server data. These methods ensure predictable UI data handling and prevent unnecessary re-renders during complex state mutations.

Does SolidJS Context work well for managing global server data?

SolidJS Context works well for sharing cross-cutting state globally, but for server data fetching, combining Context with createResource is recommended. This pattern safely lifts state and manages async server interactions without prop drilling.