zustand 5.x
Use Zustand ^5.0.0 for vanilla stores, React-bound stores, persistence, and Redux-style reducers. Covers documented v5 APIs, standalone examples, and migration traps such as stable selectors, replacement updates, and changed persistence behavior.
- For
zustand@5.0.15- Verified
- 2026-09-08, 3 examples executed
- Package
@modootoday/pmcp-zustand@5.0.0
What it covers
- Core API
- Persistence
- Redux middleware
- v5 migration traps
- Do not use the v4 equality-function shape with `create`
- Keep selector results stable
- Replacement updates require complete state
- Other v5 compatibility changes
- What this skill does not cover
One example from this skill
This is the skill's own text, not a summary of it. It runs: that is what verifying means here.
import { strict as assert } from 'node:assert'
import { createStore } from 'zustand/vanilla'
const store = createStore<{ bears: number; add: () => void }>()((set) => ({
bears: 0,
add: () => set((state) => ({ bears: state.bears + 1 })),
}))
store.getState().add()
assert.equal(store.getState().bears, 1)
assert.equal(store.getInitialState().bears, 0)
let observed = -1
const unsubscribe = store.subscribe((state) => {
observed = state.bears
})
store.setState({ bears: 3 })
assert.equal(observed, 3)
unsubscribe()
What it did in the sandbox
Verifying this skill meant installing the package and running code against it with no route out. Nothing was observed. The full ledger lists every package examined, including the ones that never became a skill.
Nothing observed is not a finding of safety. It means one run, under one policy, produced nothing to report.
Getting it
With a subscription:
npx -y @modootoday/pmcp login
npx -y @modootoday/pmcp install @modootoday/pmcp-zustand
It installs as a dev dependency of your project, and the MCP server finds it there like any other skill.