👋
for example, want this:
const dynamiccomponent = condition ? mycomponent : react.div; const useddynamiccomponent = <dynamiccomponent> how cool? </dynamiccomponent>;
what use there instead of react.div
, thing made up?
const dynamiccomponent = condition ? mycomponent : <div>{this.children}</div>; const useddynamiccomponent = <dynamiccomponent> how cool? </dynamiccomponent>;
Comments
Post a Comment