New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Zustand v5 adapter that wires a vanilla Zustand store in as json-render's state backend.

skills.sh installs
1.9K
GitHub stars
19.8K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers creating a StateStore from a Zustand vanilla store via zustandStateStore({ store }) for use with StateProvider
  • Includes optional selector and updater options for binding a nested slice and controlling how state is written back
  • Defaults to reading the entire store state and applying updates as a shallow merge unless overridden
  • Requires Zustand v5 or later, since v4 is unsupported because of breaking changes to the vanilla store interface

Install

$ npx -y skills add vercel-labs/json-render --skill zustand -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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)

Details

Repository
github.com/vercel-labs/json-render
Category
Frontend & UI Code
First seen
May 16, 2026

More from vercel-labs/json-render

All 30

Similar to Zustand

More Frontend & UI Code