Is there a way to refer to components that are not wrapped in a submodule in the same file

It’s actually really nice that we can now do <MyComponent.mySubcomponent/> not in the first place because wrapping components in modules (and exporting them) causes a fast-refresh reset (because an object is exported with a make function instead of just a react component, so fast refresh needs to bail).

But a caveat is that to my knowledge we cannot reuse these component in the same file because there is no CurrentFile (or something) module available, and <mySubcomponent/> will desugar to a hostcomponent. Or am I missing something?

I’m not sure to follow your issue with calling a subcomponent from the root file, can you post a playground link?

Not ideal, but this might work:

Thanks! Yes that was also what I was thinking to do, probably without the include is better because that is being discouraged.

1 Like

you could theoretically use escaped identifiers, but i believe this is strongly discouraged

That actually doesn’t render the component but an uppercase HTML component.

oops, nevermind. maybe it isn’t possible