Persist
This module is a wrapper for vuex-persistedstate that persist and rehydrate your Vuex state between page reloads.
Configuration
You can configure the module by adding the key persist
to the we
object in your nuxt.config.js
file.
js
we: {
persist: {
paths: ['test', 'test2'],
}
}
All the paths in the array will be persisted and rehydrated.
For an advanced configuration take a look at vuex-persistedstate api.