JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://mozilla.github.io/localForage/localforage.min.js"></script>
Open the console to see the output of this example.
JavaScript
localforage.setItem('somekey', 'some value', function(err, value) {
// Do other things once the value has been saved.
console.log(value);
localforage.removeItem('somekey', function(err,value) {
console.log('we just removed somekey');
localforage.getItem('somekey', function(err,value) {
console.log(value)
// Null result as somekey was removed.
});
});
});