typed-vuex icon indicating copy to clipboard operation
typed-vuex copied to clipboard

feat: Dynamically register and unregister a module

Open daniluk4000 opened this issue 4 years ago • 2 comments

🆒 Your use case In project with many undepended pages I want to dynamically register and unregister modules based on my needs on global level. I want those modules to be accessible and typed from anywhere. I understand all risks of possible-undefined module to be typed.

Currently, I can achieve this behavior by passing non-registered modules to getAccessorType, but if I do register those modules using store.registerModule they does not appear in $accessor.

🆕 The solution you'd like Allow to register/unregister modules on global level and registering non-exisiting modules in getAccessorType, but with separate parameter, which makes this module possible-undefined

🔍 Alternatives you've considered Use "useAccessor" and deal with usage on local level only

daniluk4000 avatar Feb 21 '22 15:02 daniluk4000

Any info on this? I can't wait to #267 merges

Strongleong avatar Sep 16 '22 03:09 Strongleong

@Strongleong you can use my module

In package.json

"nuxt-typed-vuex": "npm:[email protected]",

It contains my PRs and I use it in my production project

daniluk4000 avatar Sep 16 '22 09:09 daniluk4000