v6.5.0
This release includes the new persister-react-native-mmkv module, which allows you to persist data in a React Native MMKV store via the react-native-mmkv library.
Usage should be as simple as this:
import {MMKV} from 'react-native-mmkv';
import {createStore} from 'tinybase';
import {createReactNativeMmkvPersister} from 'tinybase/persisters/persister-react-native-mmkv';
const storage = new MMKV();
const store = createStore().setTables({pets: {fido: {species: 'dog'}}});
const persister = createReactNativeMmkvPersister(store, storage);
await persister.save();
// Store will be saved to the MMKV store.A huge shout out to Jérémy Barbet for this new persister!