I want to use window.localStorage in Vuex in Nuxt.js
问题 I developing nuxt.js app. And point is login & logout. We will develop a login to the JWT system. You must remain logged in at vuex. However, when I refresh the page, vuex is initialized. I've read git vuex-persistedstate , but it's hard to understand just how to initialize and set it. What is the best way to develop a login system in nuxt.js? Thanks. 回答1: Using vuex-persisted state would be the best use case for your scenario. I will walk you through the process of using vuex-persisted state