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
Stencil attempts to use the functional component as an element:
index-fd3d22f9.js:2677
DOMException: Failed to execute 'createElementNS' on 'Document':
The qualified name provided ('(props) => (h("div", Object.assign({}, props), 'hello!'))') contains the invalid name-start character '('.
Expected behavior:
Stencil should resolve the functional component, as if the following was written:
// stencil's convertToPublic is not exported, so we have to access it via foreachconstconvertToPublic=(utils: FunctionalUtilities)=>(node: VNode)=>{letpublicNode!: ChildNode;utils.forEach([node],(p)=>{publicNode=p;});returnpublicNode;};constConvertToMyFunctionalComponent: FunctionalComponent=(_,children,utils)=>{consttoChildNode=convertToPublic(utils);returnutils.map(children,child=>toChildNode(<MyFunctionalComponentkey={child.vkey}{...child.vattrs}>{child.vchildren}</MyFunctionalComponent>))}
The text was updated successfully, but these errors were encountered:
Stencil version:
I'm submitting a:
[x] bug report
Introduction:
Based on the
ChildNode
type in the documentation:It should be possble to return a ChildNode with a
Function
for itsvtag
. However, this does not currently work.Set up:
Current behavior:
Stencil attempts to use the functional component as an element:
Expected behavior:
Stencil should resolve the functional component, as if the following was written:
Other information:
Thread on slack
Hacky workaround:
The text was updated successfully, but these errors were encountered: