MCPcopy Index your code
hub / github.com/Lobos/react-ui / getComponentClassForElement

Function getComponentClassForElement

docs/lib/react.js:12062–12072  ·  view source on GitHub ↗

* Get a composite component wrapper class for a specific tag. * * @param {ReactElement} element The tag for which to get the class. * @return {function} The React class constructor function.

(element)

Source from the content-addressed store, hash-verified

12060 * @return {function} The React class constructor function.
12061 */
12062function getComponentClassForElement(element) {
12063 if (typeof element.type === 'function') {
12064 return element.type;
12065 }
12066 var tag = element.type;
12067 var componentClass = tagToComponentClass[tag];
12068 if (componentClass == null) {
12069 tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag);
12070 }
12071 return componentClass;
12072}
12073
12074/**
12075 * Get a native internal component class for a specific tag.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…