Closed SecretKeeper closed 5 years ago
check this example https://github.com/rubystarashe/nuxt-vuex-localstorage-example it works fine
thank you , works very well would you develop this plugin for future?
Of course. There have been a lot of updates this time, so I hope you will take note of them.
hello , first thanks for publishing this awesome plugin i have an issue with using it
1.i try like this , in
nuxt.config.js
modules: [ 'nuxt-vuex-localstorage' ]
localStorage.js
instore
folderexport const state = () => ({ my_custom_value: 33 })
<div>{{ $store.state.localStorage }}</div>
and the results is:
{ status: true } // there is no my_custom_value
i have also tried with
computed load()
function but same resultalso this is my
store/index.js
:import Vuex from 'vuex'; const createStore = () => { return new Vuex.Store({ state: () => ({ counter: 0 }), mutations: { increase (state) { state.counter++ } } }) } export default createStore