{"id":15593700,"url":"https://github.com/kasvith/electron-vuex","last_synced_at":"2025-04-24T05:43:03.931Z","repository":{"id":57124041,"uuid":"324297922","full_name":"kasvith/electron-vuex","owner":"kasvith","description":"Vuex module for Electron","archived":false,"fork":false,"pushed_at":"2020-12-26T13:03:34.000Z","size":165,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T05:42:58.884Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kasvith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-25T05:56:52.000Z","updated_at":"2021-03-12T01:31:13.000Z","dependencies_parsed_at":"2022-08-28T23:12:06.560Z","dependency_job_id":null,"html_url":"https://github.com/kasvith/electron-vuex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasvith%2Felectron-vuex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasvith%2Felectron-vuex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasvith%2Felectron-vuex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasvith%2Felectron-vuex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kasvith","download_url":"https://codeload.github.com/kasvith/electron-vuex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573298,"owners_count":21452342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T00:20:59.750Z","updated_at":"2025-04-24T05:43:03.915Z","avatar_url":"https://github.com/kasvith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Electron Vuex\n\nA fork of [vuex-electron](https://github.com/vue-electron/vuex-electron).\nWe replaced the JSON store with a memory store which allows high rate of mutations without creating temp files\n\nThe easiest way to share your Vuex Store between all processes (including main).\n\n## Features\n\n:star: Persisted state  \n:star: Shared mutations\n\n## Requirements\n\n- [Vue](https://github.com/vuejs/vue) v2.0+\n- [Vuex](https://github.com/vuejs/vuex) v2.0+\n- [Electron](https://github.com/electron/electron) v7.2.4+\n\n## Installation\n\nInstallation of the Vuex Electron easy as 1-2-3.\n\n1. Install package with using of [yarn](https://github.com/yarnpkg/yarn) or [npm](https://github.com/npm/cli):\n\n    ```bash\n    yarn install @kasvith/electron-vuex\n    ```\n\n    or\n\n    ```bash\n    npm install @kasvith/electron-vuex\n    ```\n\n2. Include plugins in your Vuex store::\n\n    ```javascript\n    import Vue from \"vue\"\n    import Vuex from \"vuex\"\n\n    import { createPersistedState, createSharedMutations } from \"@kasvith/electron-vuex\"\n\n    Vue.use(Vuex)\n\n    export default new Vuex.Store({\n      // ...\n      plugins: [\n        createPersistedState(),\n        createSharedMutations()\n      ],\n      // ...\n    })\n    ```\n\n3. In case if you enabled `createSharedMutations()` plugin you need to create an instance of store in the main process. To do it just add this line into your main process (for example `src/main.js`):\n\n    ```javascript\n    import './path/to/your/store'\n    ```\n\n4. Well done you did it! The last step is to add the star to this repo :smile:\n\n**Usage example: [Vuex Electron Example](https://github.com/vue-electron/vuex-electron-example)**\n\n## IMPORTANT\n\nIn renderer process to call actions you need to use `dispatch` or `mapActions`. Don't use `commit` because actions fired via `commit` will not be shared between processes.\n\n## Options\n\nAvailable options for `createPersistedState()`\n\n```javascript\ncreatePersistedState({\n  whitelist: [\"whitelistedMutation\", \"anotherWhitelistedMutation\"],\n\n  // or\n\n  whitelist: (mutation) =\u003e {\n    return true\n  },\n\n  // or\n\n  blacklist: [\"ignoredMutation\", \"anotherIgnoredMutation\"],\n\n  // or\n\n  blacklist: (mutation) =\u003e {\n    return true\n  }\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasvith%2Felectron-vuex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkasvith%2Felectron-vuex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasvith%2Felectron-vuex/lists"}