Skip to content
masterclass Buddy

Zustand · Type Alias

StoreApi.getState

StoreApi.getState reads the current Zustand state immediately. A store created with create exposes it as an attached API.

Last updated

Syntax

create<T>()(stateCreatorFn: StateCreator<T, [], []>): UseBoundStore<StoreApi<T>>

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • StoreApi
  • create
  • setState
  • getInitialState
  • subscribe
  • StateCreator

Source: create - Zustand Docs. Checked 2026-11-03.