{"id":22506207,"url":"https://github.com/alajfit/vuex-action-init","last_synced_at":"2025-03-27T23:29:26.142Z","repository":{"id":65480713,"uuid":"172360050","full_name":"alajfit/vuex-action-init","owner":"alajfit","description":"💚 Initiate Vuex State and Module State","archived":false,"fork":false,"pushed_at":"2019-02-24T19:07:03.000Z","size":489,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T18:51:57.799Z","etag":null,"topics":["vuex","vuex-action","vuex-action-init"],"latest_commit_sha":null,"homepage":"","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/alajfit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-24T16:17:26.000Z","updated_at":"2022-03-03T06:14:44.000Z","dependencies_parsed_at":"2023-01-25T20:01:06.893Z","dependency_job_id":null,"html_url":"https://github.com/alajfit/vuex-action-init","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alajfit%2Fvuex-action-init","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alajfit%2Fvuex-action-init/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alajfit%2Fvuex-action-init/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alajfit%2Fvuex-action-init/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alajfit","download_url":"https://codeload.github.com/alajfit/vuex-action-init/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245942990,"owners_count":20697866,"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":["vuex","vuex-action","vuex-action-init"],"created_at":"2024-12-07T00:42:04.745Z","updated_at":"2025-03-27T23:29:26.121Z","avatar_url":"https://github.com/alajfit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vuex Action Init (Starting Your State)\n[![Build Status](https://travis-ci.org/alajfit/vuex-action-init.svg?branch=master)](https://travis-ci.org/alajfit/vuex-action-init)\n[![codecov](https://codecov.io/gh/alajfit/vuex-action-init/branch/master/graph/badge.svg)](https://codecov.io/gh/alajfit/vuex-action-init)\n[![npm](https://img.shields.io/npm/v/vuex-action-init.svg) ![npm](https://img.shields.io/npm/dm/vuex-action-init.svg)](https://www.npmjs.com/package/vuex-action-init)\n\n\u003e Initiate Vuex State and Module State\n\n## Motivation\n\nI found to initiate state for a Vuex store and Vuex store module is quite awkard and a solution was needed. The library is designed to initiate the store and modules store in Vuex.\n\n* add a check for an INIT action\n* When INIT found run before anything else\n* When INIT found in SSR have it load before anything else\n\n## Install\n\n```bash\nnpm install vuex-action-init --save\n```\n\n## Usage\n\n### Use in a Vue App\n\u003e INIT method is called during load\n```js\nimport Vue from 'vue'\nimport Vuex from 'vuex'\nimport App from './App.vue'\nimport vuexActionInit from 'vuex-action-init'\n\nVue.use(Vuex)\n\nconst store = new Vuex.Store({\n  actions: {\n    INIT () {\n      console.log('Initalizing')\n    }\n  },\n  plugins: [vuexActionInit()]\n})\n\nnew Vue({\n  el: '#app',\n  store,\n  render: h =\u003e h(App)\n})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falajfit%2Fvuex-action-init","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falajfit%2Fvuex-action-init","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falajfit%2Fvuex-action-init/lists"}