Defining Stores
defineStore() supports two styles — the same two Pinia offers, named here without Vue's own vocabulary:
Schema Stores
A schema store is an object literal with state, getters, and actions fields — Nekuta reads it as a declared shape (a "schema") for the store, rather than code you write imperatively. It's the style used throughout the Quick Start, and generally the best default: it reads declaratively, and every field's role is obvious from which bucket it's in.
Hooks Stores
A hooks store is a function you write the same way you'd write a custom React hook: compose ref()/computed()/plain functions as normal, sequential code, then return an object with whatever should be public. Nekuta inspects what comes back and classifies each key automatically — there's no state/getters/actions buckets to place things into up front.
State
State is whatever state() returns (schema stores) or whatever ref()/reactive() values a hooks function returns (hooks stores). It's exposed directly on the store — no .value, no selector functions:
Getters
Getters are computed values derived from state — the equivalent of a Vue computed(), memoized and only recomputed when something they actually read changes.
Actions
Actions are plain methods, called directly off the store — synchronous or async, it doesn't matter:
Plugins
A plugin extends every store created on a Nekuta instance — the same extension point Pinia plugins use.
Subscriptions & Action Hooks
Two independent ways to observe a store from the outside, without modifying the store itself — useful for logging, persistence, analytics, or building the kind of tooling a future DevTools extension would need.
Reactivity Model
If you know Vue, Nekuta's reactivity works the way you'd expect and you can skip most of this page. If you don't, this is the one piece of Nekuta that doesn't have a close analogue in the rest of the React ecosystem, so it's worth understanding directly rather than by analogy to Redux/Zustand/Jotai.