rn-persistor
Realm persist for react native
Installation
npm install rn-persistor
Usage
import RealmStorage from 'rn-persistor';
const realmStorage = new RealmStorage();
## For persistance
const persister = createAsyncStoragePersister({
storage: realmStorage,
});
## For Data storage
async function test() {
const key = 'token';
await realmStorage.setItem(key, JSON.stringify('abcdefsdf54s5df4ds5f'));
const persistedData = await realmStorage.getItem(key);
await realmStorage.removeItem(key);
}
test();
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library