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

Function getComponentName

code/composition/public/app.js:4016–4036  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

4014}
4015
4016function getComponentName(fiber) {
4017 var type = fiber.type;
4018
4019 if (typeof type === 'function') {
4020 return type.displayName || type.name;
4021 }
4022 if (typeof type === 'string') {
4023 return type;
4024 }
4025 switch (type) {
4026 case REACT_FRAGMENT_TYPE:
4027 return 'ReactFragment';
4028 case REACT_PORTAL_TYPE:
4029 return 'ReactPortal';
4030 case REACT_CALL_TYPE:
4031 return 'ReactCall';
4032 case REACT_RETURN_TYPE:
4033 return 'ReactReturn';
4034 }
4035 return null;
4036}
4037
4038function describeFiber(fiber) {
4039 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