Initial commit
Generated by create-expo-app 3.2.0.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { MMKV } from "react-native-mmkv";
|
||||
import { StateStorage } from "zustand/middleware";
|
||||
|
||||
export const storage = new MMKV({
|
||||
id: "mmkv-storage",
|
||||
});
|
||||
|
||||
export const zustandStorage: StateStorage = {
|
||||
getItem: (key) => storage.getString(key) || null,
|
||||
setItem: (key, value) => storage.set(key, value),
|
||||
removeItem: (key) => storage.delete(key),
|
||||
};
|
||||
Reference in New Issue
Block a user