An extremely fast, small mobile key-value key/value storage library for React Native. ~30x faster than AsyncStorage!
Features:
- Get and set strings, booleans and numbers
- Fully synchronous calls, no async/await, no Promises, no Bridge.
- High performance because everything is written in C++ (even the JS functions have C++ bodies!)
- ~30x faster than AsyncStorage
- Uses JSI instead of the “old” Bridge
Preview:
1. Install and import the library.
# NPM $ npm i react-native-mmkv
import { MMKV } from 'react-native-mmkv';
2. Set & get storage.
// set MMKV.set('site.name', 'VueScript'); MMKV.set('is-vue', true);
// get const sitename = MMKV.getString('site.name') const isVue = MMKV.getBoolean('is-vue')
3. Get all keys.
const keys = MMKV.getAllKeys()
4. Delete an entry.
MMKV.delete('site.name')
Download Details:
Author: mrousavy
Live Demo: View The Demo
Download Link: Download The Source Code
Official Website: https://github.com/mrousavy/react-native-mmkv
License: MIT