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

Function describeUnknownElementTypeFrameInDEV

dash/deps/react@18.2.0.js:1959–2007  ·  view source on GitHub ↗
(type, source, ownerFn)

Source from the content-addressed store, hash-verified

1957 }
1958
1959 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1960
1961 if (type == null) {
1962 return '';
1963 }
1964
1965 if (typeof type === 'function') {
1966 {
1967 return describeNativeComponentFrame(type, shouldConstruct(type));
1968 }
1969 }
1970
1971 if (typeof type === 'string') {
1972 return describeBuiltInComponentFrame(type);
1973 }
1974
1975 switch (type) {
1976 case REACT_SUSPENSE_TYPE:
1977 return describeBuiltInComponentFrame('Suspense');
1978
1979 case REACT_SUSPENSE_LIST_TYPE:
1980 return describeBuiltInComponentFrame('SuspenseList');
1981 }
1982
1983 if (typeof type === 'object') {
1984 switch (type.$$typeof) {
1985 case REACT_FORWARD_REF_TYPE:
1986 return describeFunctionComponentFrame(type.render);
1987
1988 case REACT_MEMO_TYPE:
1989 // Memo may contain any component type so we recursively resolve it.
1990 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1991
1992 case REACT_LAZY_TYPE:
1993 {
1994 var lazyComponent = type;
1995 var payload = lazyComponent._payload;
1996 var init = lazyComponent._init;
1997
1998 try {
1999 // Lazy may contain any component type so we recursively resolve it.
2000 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2001 } catch (x) {}
2002 }
2003 }
2004 }
2005
2006 return '';
2007 }
2008
2009 var loggedTypeFailures = {};
2010 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;

Callers 2

Calls 4

shouldConstructFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…