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

Function getComponentName

code/styling/public/app.js:3878–3898  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

3876}
3877
3878function getComponentName(fiber) {
3879 var type = fiber.type;
3880
3881 if (typeof type === 'function') {
3882 return type.displayName || type.name;
3883 }
3884 if (typeof type === 'string') {
3885 return type;
3886 }
3887 switch (type) {
3888 case REACT_FRAGMENT_TYPE:
3889 return 'ReactFragment';
3890 case REACT_PORTAL_TYPE:
3891 return 'ReactPortal';
3892 case REACT_CALL_TYPE:
3893 return 'ReactCall';
3894 case REACT_RETURN_TYPE:
3895 return 'ReactReturn';
3896 }
3897 return null;
3898}
3899
3900function describeFiber(fiber) {
3901 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