Closed stefanprobst closed 3 years ago
Ohhh interested! So you have both the identifier as a component, and as an object? That’s a bug, nice catch.
Do you also have the code that uses it? I can think of this but am wondering how you’re actually passing them?
const components = {Hello}
Hello.World = World
function Hello() {
/* … */
}
function World() {
/* … */
}
yep exactly, a more real life example would be:
function Accordion(props) {
/** */
}
function AccordionPanel(props) {
/** */
}
Accordion.Panel = AccordionPanel
it's a pattern also used e.g. here
Thanks for the report and info, fixed in 1.7.0!
when using namespaced components i'm getting a
SyntaxError: Identifier has already been declared
.this is what i did:
the compiled code has the following lines: