foca-mmkv-storage
v0.0.2
Published
react-native端的持久化引擎,基于react-native-mmkv
Downloads
8
Maintainers
Readme
foca-mmkv-storage
react-native 端的持久化引擎,基于 react-native-mmkv
安装
# pnpm
pnpm add foca-mmkv-storage
cd ios && pod install
使用
import { store } from 'foca';
+import { mmkvStorage } from 'foca-mmkv-storage';
store.init({
persist: [
{
key: 'my-project',
version: '1',
+ engine: mmkvStorage,
models: [],
},
],
});
也可以定制参数
import { store } from 'foca';
+import { createMmkvStorage } from 'foca-mmkv-storage';
store.init({
persist: [
{
key: 'my-project',
version: '1',
+ engine: createMmkvStorage({...}),
models: [],
},
],
});