Giter Site home page Giter Site logo

Comments (5)

NoelDavies avatar NoelDavies commented on July 17, 2024

Don't persist it, comment out plugins: [createSharedMutations()],

from vuex-electron.

larbijirari avatar larbijirari commented on July 17, 2024

@NoelDavies thanks for your reply.
we relay on plugins: [createSharedMutations()] to allow axios authenticate using certificate from the main process, once we comment plugins: [createSharedMutations()] our request for example axios.get(...) won't work because it's executed from the renderer process because it doesn't support certificate authentication.

from vuex-electron.

akodkod avatar akodkod commented on July 17, 2024

#44

from vuex-electron.

NoelDavies avatar NoelDavies commented on July 17, 2024

@larbijirari Your main process should essentially be a router / event handler, it shouldn't be doing anything chunky. I'd suggest finding another way to get your authentication to work and possibly creating a hidden/fake window to handle these tasks and offload them from your primary renderer's processing power for painting etc.

from vuex-electron.

crwgregory avatar crwgregory commented on July 17, 2024

You can delete the file that is saved manually.
Underneath the hood this module is using electron-store that writes a json file to app.getPath('userData');
https://github.com/vue-electron/vuex-electron/blob/master/src/persisted-state.js
https://www.npmjs.com/package/electron-store/v/2.0.0

So in your main process check to see where that is on your file system:

console.log('userData', app.getPath('userData'));

Then cd into the directory and remove the vuex.json file.


It would be cool if the plugin exposed a method that let us clear the saved state (basic CRUD). But I susspect you can instantiate your own Store and load it with the same name then call the .clear() method on it to clear the state manually.

from vuex-electron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.