-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
[vuex] already installed. Vue.use(Vuex) should be called only once. #729
Comments
As the error message described, it's because you are installing Vuex into Vue two times - the first is in the script loaded at the same time as the page is loaded, the second is in late injected script after ajax request. Note that Vuex is automatically installed if FYI: you seems to load the library code in multiple times. It would cause unexpected behavior and should be avoided. I'm not sure why you load the script by explicitly calling ajax request but I would suggest you to load the libs only one time per page. |
@ktsn thank you. We ask the merchant to call our endpoint and include the html, js to their page. I have control over the Vue instance that is called through Ajax. There is a way I can create a scope/namespace? so both Vue instances can live in the same page?? or how can I prevent my instance to instantiate again and use the one already created. thank you again :) |
Version
2.0.0
Reproduction link
https://jsfiddle.net/15ww4vog/7/
Steps to reproduce
#dinamic-container
div.What is expected?
What is actually happening?
Remember.
My parent view is loading Vue instance.
and I'm injecting a Child view that also contains its own Vue instance.
The text was updated successfully, but these errors were encountered: