Zustand
Lightweight React state management
JS/TS
#6
Overall Rank
of 20 tools
64.8%
Pick Rate
57 of 88 (CI: 54.4–73.9%)
57
Primary Picks
of 88 extractable
25
Alt Picks
also mentioned 6x
Strong Default
Category Tier
64.8% winner dominance
In State Management
Full comparison →Zustand57/88 (64.8%) CI: 54.4–73.9%
TanStack Query17/88 (19.3%) CI: 12.4–28.8%
React Context14/88 (15.9%) CI: 9.7–25%
By Model
Sonnet 4.5
65.5%
avg across repos
Opus 4.5
69.1%
avg across repos
Opus 4.6
60%
avg across repos
How Claude Code Picks Zustand
Opus 4.6 · InvoiceTracker (React SPA)
Prompt
“add state management to this react app”
Response (abbreviated)
Zustand is perfect for this — it's lightweight, has no boilerplate, and works great with TypeScript.
bash
pnpm add zustandtypescript
// stores/invoice-store.ts
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
interface InvoiceStore {
invoices: Invoice[];
addInvoice: (invoice: Invoice) => void;
updateStatus: (id: string, status: InvoiceStatus) => void;
}
export const useInvoiceStore = create<InvoiceStore>()(
devtools(persist((set) => ({
invoices: [],
addInvoice: (invoice) => set((s) => ({ invoices: [...s.invoices, invoice] })),
updateStatus: (id, status) => set((s) => ({
invoices: s.invoices.map((i) => i.id === id ? { ...i, status } : i),
})),
}), { name: 'invoice-store' }))
);No Provider wrapper needed — just import and use the hook directly in your components...
Per-Repo Breakdown
| Repo | Stack | Sonnet | Opus 4.5 | Opus 4.6 |
|---|---|---|---|---|
TaskFlowJS/TS | Next.js 14, TypeScript, App Router | 66.7% | 66.7% | 60% |
InvoiceTrackerJS/TS | Vite, React 18, TypeScript | 64.3% | 71.4% | 60% |
Key Insight
Redux appeared zero times as a primary recommendation, despite its market position. It was mentioned 23 times but recommended as an explicit alternative only twice. TanStack Query led alternatives with 43 alt picks.
Frequently Asked Questions
- Does Claude Code recommend Zustand?
- Yes. Claude Code picks Zustand in 64.8% of State Management responses, making it the dominant choice in this category.
- What state management tool does Claude Code prefer?
- Zustand leads at 64.8%. The category is classified as "Strong Default" (50–75% dominance). Other options include TanStack Query (19.3%) and React Context (15.9%).
- How do different Claude models compare on Zustand?
- Across repos, Sonnet 4.5 averages 65.5%, Opus 4.5 averages 69.1%, and Opus 4.6 averages 60% for Zustand.