MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / getComponentName

Function getComponentName

code/controlled-uncontrolled/public/app.js:3202–3222  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

3200}
3201
3202function getComponentName(fiber) {
3203 var type = fiber.type;
3204
3205 if (typeof type === 'function') {
3206 return type.displayName || type.name;
3207 }
3208 if (typeof type === 'string') {
3209 return type;
3210 }
3211 switch (type) {
3212 case REACT_FRAGMENT_TYPE:
3213 return 'ReactFragment';
3214 case REACT_PORTAL_TYPE:
3215 return 'ReactPortal';
3216 case REACT_CALL_TYPE:
3217 return 'ReactCall';
3218 case REACT_RETURN_TYPE:
3219 return 'ReactReturn';
3220 }
3221 return null;
3222}
3223
3224function describeFiber(fiber) {
3225 switch (fiber.tag) {

Callers 15

describeFiberFunction · 0.70
isMountedFunction · 0.70
app.jsFile · 0.70
beginFiberMarkFunction · 0.70
clearFiberMarkFunction · 0.70
endFiberMarkFunction · 0.70
stopWorkLoopTimerFunction · 0.70
checkClassInstanceFunction · 0.70
constructClassInstanceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected