javascript - Refer to primitive DOM element class -


👋

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

Popular posts from this blog

vb.net - How to ignore if a cell is empty nothing -

Sort a complex associative array in PHP -

recursion - Can every recursive algorithm be improved with dynamic programming? -