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

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

android - How to prevent keyboard from closing when bottom dialog is open? -