Skip to content
An efficient, small & encrypted mobile key-value storage framework for React Native
Objective-C Java JavaScript Ruby
Branch: master
Clone or download

Latest commit

ammarahm-ed Merge pull request #12 from ammarahm-ed/dev
the next version release: v0.3.0
1
Latest commit 9d5981f Apr 8, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android fix promise rejection on getIntAsync Apr 8, 2020
docs update docs Apr 8, 2020
ios Merge branch 'dev' of https://github.com/ammarahm-ed/react-native-mmk… Apr 8, 2020
src fix setArrayAsync method Apr 7, 2020
.gitattributes First commit Sep 26, 2018
.gitignore First commit Sep 26, 2018
.npmignore update .npmignore Apr 8, 2020
LICENSE Create LICENSE Mar 10, 2020
README.md Update README.md Apr 8, 2020
index.d.ts update .ts definations Apr 8, 2020
index.js cleanup Apr 5, 2020
package.json update package.json Apr 8, 2020
react-native-mmkv-storage.podspec update MMKV version to 1.1.0 Apr 7, 2020

README.md

react-native-mmkv-storage

License: MIT

An efficient, small mobile key-value storage framework for React Native

What it is

This library aims to provide a fast & reliable solution for you data storage needs in react-native apps. It uses MMKV by Tencent under the hood on Android and iOS both that is used by their WeChat app(more than 1 Billion users). Unlike other storage solutions for React Native, this library lets you store any kind of data type, in any number of database instances, with or without encryption in a very fast and efficient way. Read about it on this blog post I wrote on dev.to

Features

  • Simple and lightweight
    (~ 50K Android/30K iOS) and even smaller when packaged.
  • Fast and Efficient
    MMKV uses mmap to keep memory synced with file, and protobuf to encode/decode values to achieve best performance. You can see the benchmarks here: Android & iOS
  • Multi-Process Support
    MMKV supports concurrent read-read and read-write access between processes.
  • Create unlimited Database instances
    You can create many database instances. This helps greatly if you have seperate logics/modules in the same app that use data differently, It also helps in better performance since each database instance is small instead of a single bulky database which makes things slower as it grows.
  • Full encryption support
    The library supports full encryption on Android and iOS. You can choose to store your encryption key securely for continuious usage. The library uses Keychain on iOS and Android Keystore on android (API 23 and above). On android for lower api levels (API 22 and below), it uses secure prefrences which provides not perfect but incremental security on older Android APIs.
  • Simple indexer and data querying
    For each database instance, there is one global key index and then there are indexes of each type of data. So querying is easy and fast.

Links

Quickstart

Contact & Support

  • Create a GitHub issue for bug reports, feature requests, or questions
  • Follow @ammarahm-ed for announcements
  • Add a ⭐️ star on GitHub or ❤️ tweet to support the project!

RoadMap

You can track the upcoming features, changes and the future of this library in this issue

I want to contribute

That is awesome news! There is alot happening at a very fast pace in this library right now. Every little help is precious. You can contribute in many ways:

  • Suggest code improvements on native iOS and Android
  • If you have suggestion or idea you want to discuss, open an issue.
  • Open an issue if you want to make a pull request, and tell me what you want to improve or add so we can discuss
  • I am always open to new ideas

License

This library is licensed under the MIT license.

Copyright © Ammar Ahmed (@ammarahm-ed)

You can’t perform that action at this time.