Ref conflicts with Global components: Invalid vnode type when creating vnode: .
See original GitHub issueVersion
3.2.31
Reproduction link
Steps to reproduce
I have created a global component named QRadio
as you can see in main.js
.
In App.vue, I use that component but I am also trying to create a ref to pass a reactive value to that component.
It seems that I can’t use qRadio
as a ref name because it somehow conflicts with the Global component.
What is expected?
The name of the ref should not conflict with the name of the global component
What is actually happening?
I get an error: Invalid vnode type when creating vnode: .
If I change the name qRadio
of the ref then everything works
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Vue 3 - [Vue warn]: Invalid vnode type when creating vnode
I have the following code: <script setup> import {ref, defineAsyncComponent, computed, reactive} from 'vue' import {useMainStore} from ...
Read more >inferno
Inferno is an insanely fast, React-like library for building high-performance user interfaces on both the client and server.
Read more >Rendering a list of Vue components - Learn web development
To help Vue optimize rendering the elements in the list, it tries to patch list elements so it's not recreating them every time...
Read more >Invalid vnode type when creating vnode - Get Help
I am trying to use in my AppVue view to switch between different layouts, but when I access the page, the following warning...
Read more >vendor.e7008001a8bed009bbf1.js.map
vue/dist/vue.esm.js","webpack:///(webpack)/buildin/global.js","webpack:///. ... if ( text === void 0 ) text = '';\n\n var node = new VNode();\n node.text ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing as this is working as intended as it’s also the first line in docs: https://vuejs.org/api/sfc-script-setup.html#using-components
when I said confusing I meant visually conflicting/similar. for example names that are just slightly different (ex capital letter) which is especially a problem where template have case insensitivity and more hidden logic.
BottomSheet bottomSheet
HelloWorld helloWorld
qButton QButton
related https://github.com/vuejs/core/issues/5285