Skip to content

hchiam/learning-localForage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Learning localForage

Just one of the things I'm learning. https://github.com/hchiam/learning

https://github.com/localForage/localForage

https://css-tricks.com/a-primer-on-the-different-types-of-browser-storage

https://codepen.io/hchiam/pen/MWepRZo or https://codepen.io/thgreasi/pen/ojYKeE

From scratch

Using yarn:

yarn add localforage

Or with npm:

npm install localforage

Or with CDN:

<script src="https://cdn.rawgit.com/mozilla/localForage/master/dist/localforage.js"></script>

Then there are different ways to use localForage. Here's one way:

localforage.setItem('key', 'value').then(function () {
  return localforage.getItem('key');
}).then(function (value) {
  console.log('success');
}).catch(function (err) {
  console.log('error');
});

Starting by testing out this repo

Using yarn: (triple-click to select all)

git clone https://github.com/hchiam/learning-localForage.git && cd learning-template && yarn; # and then ...

Or with npm: (triple-click to select all)

git clone https://github.com/hchiam/learning-localForage.git && cd learning-localForage && npm install; # and then ...

About

Learning localForage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published