MCPcopy Create free account
hub / github.com/plotly/dash / describeUnknownElementTypeFrameInDEV

Function describeUnknownElementTypeFrameInDEV

dash/deps/react-dom@18.3.1.js:1183–1231  ·  view source on GitHub ↗
(type, source, ownerFn)

Source from the content-addressed store, hash-verified

1181 }
1182
1183 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1184
1185 if (type == null) {
1186 return '';
1187 }
1188
1189 if (typeof type === 'function') {
1190 {
1191 return describeNativeComponentFrame(type, shouldConstruct(type));
1192 }
1193 }
1194
1195 if (typeof type === 'string') {
1196 return describeBuiltInComponentFrame(type);
1197 }
1198
1199 switch (type) {
1200 case REACT_SUSPENSE_TYPE:
1201 return describeBuiltInComponentFrame('Suspense');
1202
1203 case REACT_SUSPENSE_LIST_TYPE:
1204 return describeBuiltInComponentFrame('SuspenseList');
1205 }
1206
1207 if (typeof type === 'object') {
1208 switch (type.$$typeof) {
1209 case REACT_FORWARD_REF_TYPE:
1210 return describeFunctionComponentFrame(type.render);
1211
1212 case REACT_MEMO_TYPE:
1213 // Memo may contain any component type so we recursively resolve it.
1214 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1215
1216 case REACT_LAZY_TYPE:
1217 {
1218 var lazyComponent = type;
1219 var payload = lazyComponent._payload;
1220 var init = lazyComponent._init;
1221
1222 try {
1223 // Lazy may contain any component type so we recursively resolve it.
1224 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1225 } catch (x) {}
1226 }
1227 }
1228 }
1229
1230 return '';
1231 }
1232
1233 function describeFiber(fiber) {
1234 var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;

Callers 1

Calls 4

shouldConstructFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…