You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running npm run serve with this same code on Vue 2 will only render the first HelloWorld and throw the warning: Unknown custom element: <hello-world> in the console and suggest about adding the name option.
What is actually happening?
Running npm run serve on this code with Vue 3 does not throw any warnings/errors and actually renders the HelloWorld component 1 through 10 (unlike in Vue 2). The actual built files on the other hand will only render the first HelloWorld component (similar to Vue 2).
The text was updated successfully, but these errors were encountered:
underfin
added a commit
to underfin/vue-next
that referenced
this issue
Jun 22, 2020
Version
3.0.0-beta.15
Reproduction link
https://github.com/AaronCQL/vue-3-recursive-component
Steps to reproduce
After cloning the repository:
Notice that the
HelloWorld
component renders from 1 to 10 without throwing any errors/warnings.Now, build and serve the files:
Notice that the
HelloWorld
component only renders the first one.What is expected?
The
name
option in theHelloWorld
component has been deliberately left out. As documented in https://vuejs.org/v2/guide/components-edge-cases.html#Recursive-Components, recursive components should only be able to invoke themselves in their own template with thename
option.Running
npm run serve
with this same code on Vue 2 will only render the firstHelloWorld
and throw the warning:Unknown custom element: <hello-world>
in the console and suggest about adding thename
option.What is actually happening?
Running
npm run serve
on this code with Vue 3 does not throw any warnings/errors and actually renders theHelloWorld
component 1 through 10 (unlike in Vue 2). The actual built files on the other hand will only render the firstHelloWorld
component (similar to Vue 2).The text was updated successfully, but these errors were encountered: