Skip to content

vermilion1/react-native-async-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native AsyncStorage (WIP)

An abstraction on top of react-native's AsyncStorage.
Not tested in the production. Use it on your risk.
PR is awesome :)

####Installation npm install react-native-async-storage

####Methods

####Simple example

ReactNativeAsyncStorage.using('model_name')
  .then((model) => {
    model.get(id);
    model.find();
    model.add({field1: 'value'});
    model.add([{field2: 'value'}, {field3: 'value'}]);
    
    // Save changes when all manipulations are done.
    model.save()
      .then(() => {
        console.log('Model has been saved');
      })
      .catch((err) => console.log('Oops...', err));
  })
  .catch((err) => console.log('Oops...', err));

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published