Static GitHub Issues

[1440] store.replaceState(initalState) did not replace store state

prev: global css breaking changes
next: Invalid character in statusMessage.

I am trying to "feed" my vuex store with an initial data that has been stored on localStorage. I have try to use vuex-persiststate and write my own plugin which is just get the localStorage state, and calling store.replaceState. But, it did not replace vuex store, after digging into .nuxt directory I found that the store will be feed with window.__NUXT__.state

The question are, why my store.replaceState did not replace the state? Or, is there any better way to set initial state? Without store.commit("init", initialState) if possible.

<!--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/c1285">#c1285</a>)</em></sub></div>