
Zustand
This is a thin adapter that lets you use a Zustand vanilla store as the state backend for json-render, a library that renders UIs from JSON schemas. You wire up your Zustand store through the StateStore interface, and json-render reads and writes state through it instead of managing its own. Supports slicing into nested parts of your state tree if you don't want to hand over the whole thing. Only works with Zustand v5+, not v4, due to breaking changes in the vanilla store API. Honestly pretty niche unless you're already committed to both json-render and Zustand, but if you are, this is the glue code you need.
- skills.sh installs
- 1.9K
- GitHub stars
- 19.5K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add vercel-labs/json-render --skill zustand --agent claude-codeInstalls into .claude/skills of the current project.
Files
@json-render/zustand
Zustand adapter for json-render's StateStore interface. Wire a Zustand vanilla store as the state backend for json-render.
Installation
npm install @json-render/zustand @json-render/core @json-render/react zustand
Requires Zustand v5+. Zustand v4 is not supported due to breaking API changes in the vanilla store interface.
Usage
import { createStore } from "zustand/vanilla";
import { zustandStateStore } from "@json-render/zustand";
import { StateProvider } from "@json-render/react";
// 1. Create a Zustand vanilla store
const bearStore = createStore(() => ({
count: 0,
name: "Bear",
}));
// 2. Create the json-render StateStore adapter
const store = zustandStateStore({ store: bearStore });
// 3. Use it
<StateProvider store={store}>
{/* json-render reads/writes go through Zustand */}
</StateProvider>
With a Nested Slice
const appStore = createStore(() => ({
ui: { count: 0 },
auth: { token: null },
}));
const store = zustandStateStore({
store: appStore,
selector: (s) => s.ui,
updater: (next, s) => s.setState({ ui: next }),
});
API
zustandStateStore(options)
Sponsors
Details
- Repository
- github.com/vercel-labs/json-render
- Categories
- Frontend Development, Cloud & Infrastructure
- First seen
- May 16, 2026
More from vercel-labs/json-render
All 31- Remotion1.8K
- Image1.6K
- Remotion Best Practices1.6K
- Vue1.4K
- React Email1.4K
- Skill Creator1.4K
- Ink1.3K
- Svelte1.2K
- Shadcn Svelte1.2K
- Redux1.1K
- Jotai1.1K
- Xstate1.1K
- Solid1.1K
- Yaml1.1K
- Json Render React391
- Json Render Core340
- Json Render Shadcn213
- Json Render Remotion153
- Json Render React Native142
- React18.5K
- Core17.2K
- Codegen8.9K
- Next8.6K
- Devtools8.4K