MICROSOFT / ORIGINAL SOURCEINFORMATION · ZUSTAND STORE

A small store.
A clear contract.

Create typed Zustand stores with separate state and actions, immutable item updates and subscriptions to the values that matter.

STATEACTIONSSELECTORS
Real local Project store after adding release, selecting review and removing review, with actual state snapshot and selector events
Actual local result: two remaining items, a cleared selection and two recorded selection notifications. This screenshot shows the validation fixture, not an included application.
The useful starting point

Give shared state
a place to belong.

Built for developers adding shared client state to a React and TypeScript application: project lists, editor selections, loading indicators and recoverable errors.

The Microsoft-authored Skill guides a coding assistant through one store template, a state/action type split and project integration. You receive source patterns to adapt, with the original MIT attribution retained.

You bring

The domain
and the project.

  • A store name such as Project.
  • The values and actions your UI needs.
  • A TypeScript project with React and Zustand.
  • A coding assistant with file access and model access.
You build

A reusable
store module.

  • Typed state, actions and a combined store type.
  • Setters, add/remove behavior and a reset action.
  • Selector-based React subscriptions.
  • Subscriptions usable outside React.
What the source actually contains

SKILL.md

The Microsoft instructions: placeholder mapping, middleware pattern, selectors and integration steps.

assets/template.ts

The complete store template. Includes item state, selection, loading/error fields and reset behavior.

Know the boundary

loadItems is an empty-list example. Connect your own data source. The template does not add persistence, authentication, runtime item validation or a production backend. Removing items assumes non-null objects with an id.

Verification

Exercised locally.
Scoped honestly.

Thirteen functional checks passed on a store instantiated from the original template. Type checking and the React fixture build also passed. The browser run added an item, selected another, then removed it; the screenshot above records the resulting state.

This validates the supplied pattern and one local integration. It is not a performance benchmark, production-readiness certification or test of a customer’s application.

Use it with the right expectations.

Entry point
Load SKILL.md in a compatible coding assistant, then copy and adapt the documented template.
Dependencies
React, Zustand and TypeScript. Package installation needs registry access; no extra cloud API credential is needed for the tested store operations.
Model access
The Skill is guidance for an assistant. Your assistant’s model access and usage costs are separate.
Not a fit
Server-side databases, cross-device synchronization, data fetching services or application-specific business validation.
License
MIT, copyright Microsoft Corporation. This redistribution does not imply Microsoft endorsement of the listing.
Source provenance

microsoft/skills · zustand-store-ts
Pinned commit 0696600436a9669184ce47e8d8b2ceac62e4bfac.
Original runtime files are unchanged; packaging adds provenance, the original license and a promotional cover.