Overview:
MMKV is an efficient mobile key-value storage framework developed by WeChat. react-native-mmkv is a library that enables the use of MMKV in React Native applications with fast and direct bindings to the native C++ library accessible through a simple JS API.
Features:
- Get and set strings, booleans, and numbers
- Fully synchronous calls, no async/await, no Promises, no Bridge
- Encryption support (secure storage)
- Multiple instances support (separate user-data with global data)
- Customize storage location
- High performance due to C++ implementation (~30x faster than AsyncStorage)
- Uses JSI instead of the “old” Bridge
- Supports iOS, Android, and Web
- Easy to use React Hooks API
Installation:
- React Native Expo
$ npm install react-native-mmkv
Summary:
MMKV provides a high-performance mobile key-value storage solution with encryption support, multiple instance support, and easy-to-use React Hooks API. react-native-mmkv library facilitates seamless integration of MMKV into React Native applications, offering fast and direct bindings to the native C++ library for efficient data storage and retrieval.