When we pass a component by prop, is throwed an error saing: Componen not defined:
Ex:
classExternalComponent{render({test}){return<div>{test}</div>;}}classComponent{renderInnerComponent(){return<span/>;}renderAnotherInnerComponent(){return<InnerComponent/>;}render(){return<ExternalComponenttt="here"test={<AnotherInnerComponent/>}/>;}}Should be parsed to:
classExternalComponent{render({test}){return<div>{test}</div>;}}classComponent{renderInnerComponent(){return<span/>;}renderAnotherInnerComponent(){constInnerComponent=this.renderInnerComponent;return<InnerComponent/>;}render(){constAnotherInnerComponent=this.renderAnotherInnerComponent;return<ExternalComponenttt="here"test={<AnotherInnerComponent/>}/>;}}
When we pass a component by prop, is throwed an error saing: Componen not defined:
Ex:
Should be parsed to: