Home:ALL Converter>Why is the store state of the vuex not stored in localStorage?

Why is the store state of the vuex not stored in localStorage?

Ask Time:2020-04-14T20:40:27         Author:Rebbeca

Json Formatter

When I refresh the page, the store's state is all gone.

This is very inconvenient when programming.

When I looked up, there was a module called vuex-persist, which stores the state of vuex in localStorage.

  1. Why doesn't vuex store the state of vuex by default in cookie or localStorage?

  2. And, will there be any side effects of storing the state of the store using the vuex-persist module?

Author:Rebbeca,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61207928/why-is-the-store-state-of-the-vuex-not-stored-in-localstorage
yy