Skip to content

Instantly share code, notes, and snippets.

@lubien
Created April 4, 2017 20:28
Show Gist options
  • Save lubien/252e946a4ff5ae86ee74692c8b0f1732 to your computer and use it in GitHub Desktop.
Save lubien/252e946a4ff5ae86ee74692c8b0f1732 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