Skip to content
masterclass Buddy

Zustand · Method

persist.rehydrate

persist saves Zustand store state across page reloads or application restarts. It can restore state automatically or let you trigger restoration with persist.rehydrate().

Last updated

Syntax

persist<T, U = T>(stateCreatorFn: StateCreator<T, [], []>, persistOptions: PersistOptions<T, U>): StateCreator<T, [['zustand/persist', U]], []>

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

Subscribe
  • create
  • createStore
  • createJSONStorage
  • partialize
  • onRehydrateStorage
  • version
  • migrate
  • merge

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