react-native-sync-localstorage-fixed

2.0.2 • Public • Published

react-native-localstorage

Sync local storage for React-Native, Expo Compatible (Web, Android, iOS)

Disclaimer

Original Autor yangga, It was no longer being maintained


https://github.com/yangga/react-native-sync-localstorage

[Installation]

npm i react-native-sync-localstorage-fixed

[Usage]

1. Loading stored values at beginnig

import localStorage from 'react-native-sync-localstorage-fixed'

...

localStorage.getAllFromLocalStorage()
  .then(() => {
    // Do Something after loading...
  })
  .catch(err => {
    console.warn(err)
  })

2. Use local storage comfortable

2-1. Setting

const value = 12345
localStorage.setItem('key', value)

2-2. Getting

localStorage.getItem('key')

2-3. Deleting

localStorage.removeItem('key')

TODO

  • [x] Make it usable again

Package Sidebar

Install

npm i react-native-sync-localstorage-fixed

Weekly Downloads

0

Version

2.0.2

License

ISC

Unpacked Size

6.57 kB

Total Files

7

Last publish

Collaborators

  • habba