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
import{createApp,defineComponent,h}from'vue'constcustomComponent=defineComponent({props: {text: String,},setup(props){return()=><p>{props.text}</p>},})createApp({components: {
customComponent,},setup(){return()=>h('customComponent',{text: 'this is a component!'})// return () => h(customComponent, { text: 'this is a component!' })},}).mount('#app')
is this a broken change or a bug?
What is expected?
vue2 Rendering results:
<p>this is a component!</p>
What is actually happening?
vue@3.0.0-alpha.8 Rendering results:
<customcomponenttext="this is a component!"></customcomponent>
i'm trying to rewrite the jsx-plugin,
but found h('custom-component') doesn't work.
The text was updated successfully, but these errors were encountered:
v3 no longer supports rendering component using strings, since when you are using render functions you can always use the direct value. This also enables better compiler optimizations.
If you have to use a global registered component in render functions, use resolveComponent:
Version
3.0.0-alpha.8
Reproduction link
Steps to reproduce
vue2 example
https://codepen.io/dewfall/pen/eYNVXEb
vue3
is this a broken change or a bug?
What is expected?
vue2 Rendering results:
What is actually happening?
vue@3.0.0-alpha.8 Rendering results:
i'm trying to rewrite the jsx-plugin,
but found
h('custom-component')
doesn't work.The text was updated successfully, but these errors were encountered: