question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility of define vuex plugin into the module

See original GitHub issue

Hi guys! I think it will be great to define vuex plugin into the module:

@Module
class MyModule extends VuexModule {
    .....
   @Plugin
   myPlugin() {
       return store => ....
   }
}

Often more logical to define plugin into the module instead store. And I think Plugin decorator is very suitable to solve this problem

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
championswimmercommented, Dec 27, 2018

Plugins exist on store not on a particular module

On Thu 27 Dec, 2018, 10:52 PM Architect Of Web <notifications@github.com wrote:

But there are…

https://vuex.vuejs.org/guide/plugins.html

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/championswimmer/vuex-module-decorators/issues/65#issuecomment-450195220, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQ_yjKm1T7SLdCO-QUbTcREtoWaN8uBks5u9QHOgaJpZM4ZLeRj .

0reactions
cliedeltcommented, Dec 31, 2018

Good Tip. Just implemented in on the main index store

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Vue.js plugin in Vuex Store module - Stack Overflow
Show activity on this post. The cleanest way I found is to import Vue in the store/module and then use the plugin via...
Read more >
Modules | Vuex
To help with that, Vuex allows us to divide our store into modules. Each module can contain its own state, mutations, actions, getters,...
Read more >
Unit testing Vuex modules with Jest - LogRocket Blog
What is Vuex ? ... Vuex is a state management pattern and library for Vue applications that allows you to use centralized state...
Read more >
A Practical Guide to Harlem - Medium
Harlem — A simple alternative to Vuex for Vue 3 ... Next, register this extension on the module you want to include actions...
Read more >
Vuex-persist - npm.io
A Typescript-ready Vuex plugin that enables you to save the state of your app to ... being overwritten with the default state defined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found