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

Parameters in the constructor #81

Closed
ryanleecode opened this issue Jan 3, 2019 · 3 comments
Closed

Parameters in the constructor #81

ryanleecode opened this issue Jan 3, 2019 · 3 comments

Comments

@ryanleecode
Copy link

Can parameters be passed in the constructor?

In the documentation it states,

NOTE

The way we use the MyModule class is different from classical object-oriented programming and similar to how vue-class-component works. We use the class itself as module, not an object constructed by the class

new MyModule() ❌

#

Which means I can't constructor the module with constructor parameters and pass it directly to the store.

@championswimmer
Copy link
Owner

The constructor is never to be used.

@ryanleecode
Copy link
Author

Is it impossible to have external dependencies without importing them globally?

@barakbd-bluevine
Copy link

See my comment here:
kaorun343/vue-property-decorator#81

There is a reason to use constructor.

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

3 participants