Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dynamically register and unregister a module #266

Open
daniluk4000 opened this issue Feb 21, 2022 · 2 comments · May be fixed by #267
Open

feat: Dynamically register and unregister a module #266

daniluk4000 opened this issue Feb 21, 2022 · 2 comments · May be fixed by #267
Assignees
Labels
enhancement New feature or request

Comments

@daniluk4000
Copy link
Contributor

🆒 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 daniluk4000 added the enhancement New feature or request label Feb 21, 2022
daniluk4000 pushed a commit to daniluk4000/nuxt-typed-vuex that referenced this issue Feb 22, 2022
@danielroe danielroe assigned daniluk4000 and unassigned danielroe Feb 23, 2022
daniluk4000 pushed a commit to daniluk4000/nuxt-typed-vuex that referenced this issue Feb 24, 2022
daniluk4000 pushed a commit to daniluk4000/nuxt-typed-vuex that referenced this issue Feb 24, 2022
daniluk4000 pushed a commit to daniluk4000/nuxt-typed-vuex that referenced this issue Feb 28, 2022
daniluk4000 added a commit to daniluk4000/nuxt-typed-vuex that referenced this issue Mar 31, 2022
@Strongleong
Copy link

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

@daniluk4000
Copy link
Contributor Author

daniluk4000 commented Sep 16, 2022

@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 added a commit to daniluk4000/nuxt-typed-vuex that referenced this issue Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants