Exposes a Storage as a StateStorage. Each name becomes an item in the storage's namespace, with the same key checks, size limit and change notifications.
persist(createStore, { name: 'cart', storage: createJSONStorage(() => toStateStorage(storage)) }) Copy
persist(createStore, { name: 'cart', storage: createJSONStorage(() => toStateStorage(storage)) })
Exposes a Storage as a StateStorage. Each name becomes an item in the storage's namespace, with the same key checks, size limit and change notifications.