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

Using Vuex getters inside a supply #9

Open
monocursive opened this issue Jun 24, 2017 · 1 comment
Open

Using Vuex getters inside a supply #9

monocursive opened this issue Jun 24, 2017 · 1 comment

Comments

@monocursive
Copy link

Hi, I'm having a hard time wrapping my head around the way supply cache is used.

I'm injecting the store (composed with injectSupply(storeOptions, supplyCache)), but when I try to use it in my supply with this.$store I get two keys :

this.$store.default which is the store I want to use,
and this.$store.supplyCache.

Therefore I can't use mapgetters and all. Is there a right way to access store getters from the supply? When I'm trying to launch a subscription depending on Vuex store data it seems that this.$store.default is undefined on first run so it makes the app crash.

@monocursive
Copy link
Author

monocursive commented Jun 24, 2017

Ok, I think I found what's going wrong, by injecting the store in the supply, it gets recursively injected in the supplycache, which in turn gets inserted in the store etc..
is there a way to circumvent this?

screen shot 2017-06-24 at 12 37 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant