You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simply pass a function that returns the storage you want to use.
59
+
Enables you to use your own storage. Simply pass a function that returns the storage you want to use. It's recommended to use the [`createJSONStorage`](#createjsonstorage) helper function to create a `storage` object that is compliant with the `StateStorage` interface.
This helper function enables you to create a [`storage`](#storage) object which is useful when you want to use a custom storage engine.
424
+
425
+
`getStorage` is a function that returns the storage engine with the properties `getItem`, `setItem`, and `removeItem`.
426
+
427
+
`options` is an optional object that can be used to customize the serialization and deserialization of the data. `options.reviver` is a function that is passed to `JSON.parse` to deserialize the data. `options.replacer` is a function that is passed to `JSON.stringify` to serialize the data.
0 commit comments