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

Function getComponentName

code/third-party/public/app.js:3111–3131  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

3109}
3110
3111function getComponentName(fiber) {
3112 var type = fiber.type;
3113
3114 if (typeof type === 'function') {
3115 return type.displayName || type.name;
3116 }
3117 if (typeof type === 'string') {
3118 return type;
3119 }
3120 switch (type) {
3121 case REACT_FRAGMENT_TYPE:
3122 return 'ReactFragment';
3123 case REACT_PORTAL_TYPE:
3124 return 'ReactPortal';
3125 case REACT_CALL_TYPE:
3126 return 'ReactCall';
3127 case REACT_RETURN_TYPE:
3128 return 'ReactReturn';
3129 }
3130 return null;
3131}
3132
3133function describeFiber(fiber) {
3134 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