Skip to content

Instantly share code, notes, and snippets.

@ronaiza-cardoso
Forked from lubien/localstorage.js
Created April 4, 2017 20:37
Show Gist options
  • Save ronaiza-cardoso/e011efea4ddfd021a5502c6339505db9 to your computer and use it in GitHub Desktop.
Save ronaiza-cardoso/e011efea4ddfd021a5502c6339505db9 to your computer and use it in GitHub Desktop.
const userData = {name: 'lubien'}
localStorage.setItem('user', JSON.stringify(userData))
const persisted = JSON.parse(localStorage.getItem('user'))
console.log(persisted)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment