react-native-mmkv

⚡️ The fastest key/value storage for React Native. ~30x faster than AsyncStorage!

What is react-native-mmkv?

⚡️ The fastest key/value storage for React Native. ~30x faster than AsyncStorage!

Overview of react-native-mmkv

What it is

react-native-mmkv is a key/value storage library for React Native that wraps the native MMKV framework developed by WeChat. It provides fast, synchronous access to storage through direct JS bindings to the native C++ library, claiming to be approximately 30 times faster than AsyncStorage.

Key features

  • Get and set strings, booleans, numbers, and ArrayBuffers
  • Fully synchronous calls – no async/await, no Promises, no Bridge
  • Encryption support (AES-128 and AES-256) for secure storage
  • Multiple instances support to separate user data from global data
  • Customizable storage location
  • ~30x faster than AsyncStorage
  • Uses JSI and C++ NitroModules instead of the old Bridge
  • iOS, Android, and Web support
  • Easy-to-use React Hooks API

Use cases

  • Storing user preferences and app settings
  • Caching data for offline use
  • Securely storing sensitive information with encryption
  • Sharing data between an app and its extensions or App Groups
  • Managing separate storage for different users or contexts

Getting started

### React Native
npm install react-native-mmkv react-native-nitro-modules
cd ios && pod install

### Expo
npx expo install react-native-mmkv react-native-nitro-modules
npx expo prebuild

License and pricing

Licensed under the MIT License. The project is open source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/margeloreact-native-mmkv.svg)](https://yunodb.com/tools/margeloreact-native-mmkv?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/margeloreact-native-mmkv?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/margeloreact-native-mmkv.svg" alt="Featured on YunoDB" height="20"></a>