Registering vuex storage module with existing resource namespace issue #3485
Unanswered
KasparRosin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Took a while to debug, so I thought i'd write a discussion, maybe there is an alternative solution to my method.
I created a nova component, that utilises the Nova.booting method's.
My goal was to create a new resource for $store.
Code exampe:
I went the same way that nova goes, by looping the resources in config and adding my own store resource to it.
Me not being familiar with Vuex, ran into a issue where my state that i had defined in
myResoruce
was not observed.Because the state existed in store and all the functions were working (getters, setters, actions etc), i couldn't figure out the issue.
Upon replacing the module namespace with a unique one, it worked.
My question would be, is there a way to register multiple modules under the same namespace in Nova, considering that nova adds it's modules after booting method is called.
Beta Was this translation helpful? Give feedback.
All reactions