Skip to main content

Function: createPersistConfig()

createPersistConfig<TState, TPersisted>(storeName: string, partialize?: (state: TState) => TPersisted): PersistOptions<TState, TPersisted>

Defined in: src/stores/utils.ts:19

Creates a Zustand persist configuration object with a normalized storage key.

Type Parametersโ€‹

TStateโ€‹

TState

TPersistedโ€‹

TPersisted = Partial<TState>

Parametersโ€‹

storeNameโ€‹

string

partialize?โ€‹

(state: TState) => TPersisted

Returnsโ€‹

PersistOptions<TState, TPersisted>