Skip to main content

Interface: UsePersistedStateOptions

Defined in: use-persisted-state.ts:27

Options for usePersistedState.

Properties​

storage?​

optional storage?: PersistedStateStorage

Defined in: use-persisted-state.ts:35

Where to persist the value. Defaults to localStorage. Use sessionStorage to keep the value only for the current tab session.

Pass the same storage on every render; switching storages while mounted only affects later reads and writes.