A novice learning vue+nuxt;
encounters a problem and is confused for a long time. When refreshing the page, the vuex state security problem in nuxt;
problem 1, cooperate with the plug-in vuex-persistedstate for localization, but in store/index.js, setting the plug-in causes the window object not to be found. How can I use vuex-persistedstate without making mistakes?
problem 2. When storing only a small amount of critical data (such as login uuid and user name), use fetch to request the server to find the key data (such as / api/getUserInf). Where should fetch be placed in the project structure? Is it placed at a higher level of the framework? Or will store be placed in any component that needs to be used?
question 3. Is fetch running on the client or the server?
question 4. NuxtServerInit. If it is an encrypted cookie, the userID cannot be extracted from the nuxtServerInit. Is there a way to solve this problem?