Remove dead code
Dan Abramov committed
Jun 7, 2019 at 18:42 UTC
fdc5ca4ba6227d35df89c404542be4ea3f6504d2
1 file changed
+1
-9
src/backend/legacy/getData.js
+1
-9
@@ -26,17 +26,9 @@ export default function getData(internalInstance: InternalInstance): FiberData {
26
type = ElementTypeHostComponent;
27
displayName = elementType;
28
} else if (typeof elementType === 'function') {
29
- // TODO Can we differentiate between function and class component types?
30
- // Dan said _compositeType tells you PureClass, ImpureClass, StatelessFunctional but it was only added in v14
31
- // getPublicInstance() returns null for function components
29
+ // TODO: detect function components.
30
type = ElementTypeClass;
31
displayName = getDisplayName(elementType);
34
- } else if (typeof internalInstance._stringText === 'string') {
35
- // ...
36
- } else {
37
- // TODO What kind of case does this cover?
38
- console.log('what is this type?');
39
- displayName = getDisplayName(elementType);
32
}
33
}
34