The template option doesn't replace the mounted element
Version
3.0.7
Reproduction link
https://jsfiddle.net/rn7uwogy/
Steps to reproduce
Add a template option to any Vue instance.
What is expected?
The original element is replaced.
What is actually happening?
The original element remains.
The documentation clearly says "the template will replace the mounted element", but that's not what is happening. This works correctly in Vue.js 2.0.
That's an intended change in Vue 3.
If there's a mistake in the docs, please open an issue in the docs-next repo with an exact location where you spotted the mistake.
Thanks.
Great, this "intended" change is not described anywhere and you don't care that the current documentation is wrong.
I guess I'll stay with Vue.js 2 forever, since Vue.js 3 is useless to me.
Thanks.
I do care. I just asked you to help a bit by opening an issue in the correct repo, and be a bit more specific about what you said you read in the docs.
If that's too much work for you, feel free to use Vue 2.
I do care. I just asked you to help a bit by opening an issue in the correct repo, and be a bit more specific about what you said you read in the docs.
My issue is with Vue 3's code, which does not work correctly.
Your issue is with Vue 3's documentation.
My issue has absolutely nothing to do with documentation.
Even if I did work to fix your issue, that does absolutely nothing to improve my issue.
Your issue will not be solved in this repo as the change is an intended one. Vue 3 no longer replaces the element that it mounts to.
So the only thing left to do would be to improve documentation so others don't get the same wrong impression as you did.
From your replies though, it see that you only care about your own issue and don't see a point in helping out the project or its community as a whole, so I don't think we have much more to talk about.
The
innerHTML
of the provided DOM element will be replaced with the rendered template of the application root component.
We also have an entire dedicated section about it in our Migration guide.