Zustand 5.x

getState

Returns the current snapshot without subscribing.

Formal Syntax & Structure

react syntaxreact
store.getState()

Working Example

Example Snippetreact
store.getState()
React Reference