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

Question about NewComponent and multiple invocations of the model constructor vmCreator per component instance #1

Closed
theclapp opened this issue May 4, 2016 · 2 comments

Comments

@theclapp
Copy link

theclapp commented May 4, 2016

In component.go, NewComponent has a closure called vmfn, which calls the vmCreator function every third time it (vmfn) is invoked. The intent seems to be call vmCreator once for each instance of the given component.

As near as I can tell, vmfn is called four times per component.

Is there a mismatch going on somewhere, or have I missed something, or what?

Thanks for this package!

@theclapp
Copy link
Author

theclapp commented May 5, 2016

vmCreator is called twice in the "init" lifecycle event, and then twice in Vue.prototype._initData, once as dataFn() and once as this._runtimeData().

@oskca
Copy link
Owner

oskca commented Jan 22, 2017

yes, the multiple invocation of vmfn is on purpose for vue.GetVM to work in components

@oskca oskca closed this as completed Jan 22, 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