Zustand как хранилище для json-render
★ 8.1 · vibe-coding
Управление состоянием через Zustand is a Claude Code skill that wires a Zustand vanilla store as the state backend for json-render by implementing the `StateStore` interface via the `@json-render/zustand` adapter. Reach for it when you already have a Zustand store in your React app and want json-render to read and write through it without duplicating state, or when your store is organized into nested slices (like `ui` or `auth`) and you need to bind json-render to only one of them. Install via npm: `@json-render/zustand @json-render/core @json-render/react zustand`; Zustand v5+ is required — v4 is explicitly unsupported due to breaking changes in the vanilla store API. The core function is `zustandStateStore(options)`: takes a required `store` (`StoreApi` from `zustand/vanilla`), an optional `selector` to pick a state slice, and an optional `updater` to control how the next state is applied (defaults to shallow merge; override for nested slices or full replacement). Wrap your component tree with `<StateProvider store={store}>`. This skill connects json-render to Zustand — it is not a standalone React state management solution outside of json-render. Suitable for React projects using json-render alongside Zustand v5+; not applicable if Zustand is absent or if you are on v4.
- #zustand
- #state-management
- #json-render
- #react
- #vanilla-store