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

Connect dynamic module to component based on prop #41

Closed
b-zee opened this issue Sep 14, 2017 · 1 comment
Closed

Connect dynamic module to component based on prop #41

b-zee opened this issue Sep 14, 2017 · 1 comment

Comments

@b-zee
Copy link

b-zee commented Sep 14, 2017

I am quite skeptical something like this should be possible:

stateToProps: {
  data: (state, component) => state.articles[component.id].data
},

However, is there some way to connect a component to a module based on a namespace that has been provided to the component some way?

I found a similar issue vuejs/vuex#863, which seems related, and in which vuex-connect is mentioned.

@ktsn
Copy link
Owner

ktsn commented Sep 14, 2017

You can just use this in the function.
https://jsfiddle.net/sknhrdxw/1/

@ktsn ktsn closed this as completed Sep 14, 2017
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

2 participants