createStore in SolidJS
From the SolidJS cheat sheet ยท Stores ยท verified Jul 2026
createStore
Create a reactive store for complex nested state with path-based updates.
typescript
// Quick Reference
import { createStore } from "solid-js/store";
const [state, setState] = createStore({ count: 0, user: { name: "Alice" } });
setState("count", 1);
setState("user", "name", "Bob");๐ก Store properties are accessed directly (state.count) โ no getter function call needed
โก Path-based setState only triggers updates for the exact changed property
๐ Use a function as a path segment to match array items by condition
๐ข Stores are ideal for complex state โ signals are better for simple atomic values
storesstatenested