Skip to content

A simple, performance oriented key value storage for React Native. Drop in replacement for AsyncStorage

Notifications You must be signed in to change notification settings

volga-volga/react-native-fast-storage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-fast-storage

react-native-fast-storage is a drop in replacement for AsyncStorage.

This library is the React Native implementation of https://github.com/Tencent/MMKV.

It provides very fast read and write access.

Getting started

yarn add https://github.com/volga-volga/react-native-fast-storage.git
react-native link react-native-fast-storage

Manual ios linking

  • Insert into Podfile:
pod 'react-native-fast-storage', path: '../node_modules/react-native-fast-storage'
  • run pod install in ios directory

Usage

import FastStorage from 'react-native-fast-storage';

await FastStorage.setItem('key', 'value');
const item = await FastStorage.getItem('key');

Methods

All methods are asynchronous, just like AsyncStorage.

Prop Params Returns Description
setItem  key, value  value  Allows to set an item
getItem  key  value  Retrieve the item
removeItem  key  null  Remove an item from the store
clearStore  none  null  Clear the entire store

About

A simple, performance oriented key value storage for React Native. Drop in replacement for AsyncStorage

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 44.6%
  • Objective-C 43.3%
  • Ruby 9.3%
  • JavaScript 2.8%