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? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -