Static GitHub Issues

[838] How do I use local Storage?

prev: window is not defined
next: Where to put code that runs once on app startup (no main.js)

I think javaScript can't find localStorage because it is looking for it on Server Side. I am trying to use a plugin for vuex to save data on localStorage.

Can anyone help me set it up? Getting error: localStorage is not defined.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c716">#c716</a>)</em></sub></div>