Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By TheBushidoCollectivev1.3.0Apache-2.0In 1 marketplace
Gives Claude Code expert guidance on Zustand stores for React: store creation, typed selectors, persist and devtools middleware, and optimistic updates. Skills-only, with no commands to run.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Comprehensive Zustand state management skills for React applications with store patterns, middleware, TypeScript integration, and advanced techniques.
This plugin provides comprehensive skills for working with Zustand:
han plugin install zustand
This is a skills-only plugin that provides expert guidance on Zustand state management patterns. The skills are automatically available in Claude Code once installed.
create()import { create } from 'zustand'
interface CounterStore {
count: number
increment: () => void
decrement: () => void
}
export const useCounterStore = create<CounterStore>()((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
decrement: () => set((state) => ({ count: state.count - 1 })),
}))
// Usage in component
function Counter() {
const { count, increment, decrement } = useCounterStore()
return (
<div>
<h1>{count}</h1>
<button onClick={increment}>+</button>
<button onClick={decrement}>-</button>
</div>
)
}
import { create } from 'zustand'
import { persist, createJSONStorage } from 'zustand/middleware'
interface CartStore {
items: CartItem[]
addItem: (item: CartItem) => void
removeItem: (id: string) => void
clearCart: () => void
}
export const useCartStore = create<CartStore>()(
persist(
(set) => ({
items: [],
addItem: (item) =>
set((state) => ({ items: [...state.items, item] })),
removeItem: (id) =>
set((state) => ({
items: state.items.filter((item) => item.id !== id),
})),
clearCart: () => set({ items: [] }),
}),
{
name: 'shopping-cart',
storage: createJSONStorage(() => localStorage),
}
)
)
Problem: Component re-renders when any part of the store changes.
Solution: Use specific selectors instead of selecting the entire store:
// ❌ Bad: Re-renders on any state change
const store = useStore()
// ✅ Good: Only re-renders when count changes
const count = useStore((state) => state.count)
Problem: Type errors when using multiple middleware together.
Solution: Use the ()() pattern with proper generics:
const useStore = create<Store>()(
devtools(
persist(
(set) => ({ /* ... */ }),
{ name: 'store' }
)
)
)
Problem: State doesn't persist across page refreshes.
Solution: Ensure you're using the correct storage and name:
7-day copy clicks
npx claudepluginhub thebushidocollective/han --plugin zustandBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground