MitsuhaKitsune / vuex-webextensions

A Vuex plugin to share store through webextensions components
MIT License
83 stars 30 forks source link

Not persisting. Store is reset every time extension icon is clicked #29

Open jacobcoro opened 4 years ago

jacobcoro commented 4 years ago

Project is at https://github.com/IPFC/ipfc-extension

Screen Shot 2020-03-06 at 11 45 17 AM

// store.js
import Vue from 'vue';
import Vuex from 'vuex';
import VuexWebExtensions from 'vuex-webextensions';
import * as getters from './getters';
import mutations from './mutations';
import * as actions from './actions';

Vue.use(Vuex);

export default new Vuex.Store({
  plugins: [
    VuexWebExtensions({
      persistentStates: ['jwt', 'pinataKeys'],
      loggerLevel: 'verbose',
    }),
  ],
  state: {
    jwt: 'initial',
    jwtValid: false,
    pinataKeys: null,
  },
  getters,
  mutations,
  actions,
});
```as you can see in the screenshot from the console.logs, the mutation ('setJwt') is successful, but as soon as i click elsewhere and reclick the extension icon, it gets reset and goes back to the store staring value.
rendomnet commented 3 years ago

This project is abandoned.