Open
Description
When we pass a component by prop, is throwed an error saing: Componen not defined:
Ex:
class ExternalComponent {
render({test}) {
return <div>{test}</div>;
}
}
class Component {
renderInnerComponent() {
return <span />;
}
renderAnotherInnerComponent() {
return <InnerComponent />;
}
render() {
return <ExternalComponent tt="here" test={<AnotherInnerComponent />} />;
}
}
Should be parsed to:
class ExternalComponent {
render({test}) {
return <div>{test}</div>;
}
}
class Component {
renderInnerComponent() {
return <span />;
}
renderAnotherInnerComponent() {
const InnerComponent = this.renderInnerComponent;
return <InnerComponent />;
}
render() {
const AnotherInnerComponent = this.renderAnotherInnerComponent;
return <ExternalComponent tt="here" test={<AnotherInnerComponent/>} />;
}
}
Metadata
Metadata
Assignees
Labels
No labels