quarrant / mobx-persist-store

Persist and rehydrate observable properties in mobx store.
268 stars 14 forks source link

mmkv storage support #73

Closed negati-ve closed 10 months ago

negati-ve commented 2 years ago

Hi,

Is it possible to support https://github.com/ammarahm-ed/react-native-mmkv-storage ? on RN, mmkv produces a far superior result than localforage

quarrant commented 2 years ago

Why not? You can write yours implementation of interface https://github.com/quarrant/mobx-persist-store/blob/master/src/types.ts#L38

Navipro70 commented 2 years ago

@negati-ve From rn-mmkv docs: asd But rn-mmkv-storage set's values by types, just add typeof condition for set for every type. I don't know is rn-mmkv-storage supports getting any non type based value, if isn't, I simply suggest you to use react-native-mmkv, or just set and get values with JSON parsing

I hope my info helps you, this issue not exactly related to mobx-persist-store

quarrant commented 2 years ago

Show me an example and I'll help you with typings