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

Function getComponentName

code/communication/public/app.js:3913–3933  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

3911}
3912
3913function getComponentName(fiber) {
3914 var type = fiber.type;
3915
3916 if (typeof type === 'function') {
3917 return type.displayName || type.name;
3918 }
3919 if (typeof type === 'string') {
3920 return type;
3921 }
3922 switch (type) {
3923 case REACT_FRAGMENT_TYPE:
3924 return 'ReactFragment';
3925 case REACT_PORTAL_TYPE:
3926 return 'ReactPortal';
3927 case REACT_CALL_TYPE:
3928 return 'ReactCall';
3929 case REACT_RETURN_TYPE:
3930 return 'ReactReturn';
3931 }
3932 return null;
3933}
3934
3935function describeFiber(fiber) {
3936 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