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

Function getComponentName

code/event-handlers/public/app.js:3208–3228  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

3206}
3207
3208function getComponentName(fiber) {
3209 var type = fiber.type;
3210
3211 if (typeof type === 'function') {
3212 return type.displayName || type.name;
3213 }
3214 if (typeof type === 'string') {
3215 return type;
3216 }
3217 switch (type) {
3218 case REACT_FRAGMENT_TYPE:
3219 return 'ReactFragment';
3220 case REACT_PORTAL_TYPE:
3221 return 'ReactPortal';
3222 case REACT_CALL_TYPE:
3223 return 'ReactCall';
3224 case REACT_RETURN_TYPE:
3225 return 'ReactReturn';
3226 }
3227 return null;
3228}
3229
3230function describeFiber(fiber) {
3231 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