Skip to content

bradical1379/ionic-storage-example

 
 

Repository files navigation

ionic-storage-example

An example of using Ionic Storage with React

Showcasing the following Ionic Storage functionality

  1. new Storage() with config using Drivers
  2. create()
  3. set()
  4. get()
  5. remove()
  6. clear()
  7. Some custom functions for accessing arrays of objects

Based on the "list" Ionic React starter template

  • All @ionic/storage functionality is in IonicStorage.js within the data folder

  • Pass any name to the createStore function to name your DB

  • Mimic of data fetching from messages.js just like in the list starter template

  • Fetched data is placed into Ionic Storage then manipulated throughout

  • Upon "refresh", if the msgs key exists in Ionic Storage, this will be used instead of fetching

To reset: within DevTools > Application, delete the IndexedDB created. It will then be re-created and populated with fetched data.

Are you on Twitter? Lets connect @93alan

About

An example of using Ionic Storage with React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 47.1%
  • CSS 32.5%
  • Swift 14.7%
  • HTML 3.6%
  • Ruby 2.1%