Add React.Timeout to getComponentName (#12890)

This commit is contained in:
Toru Kobayashi
2018-05-24 02:39:20 +09:00
committed by Dan Abramov
parent 3df157480a
commit fe747a51c1

View File

@@ -18,6 +18,7 @@ import {
REACT_PROFILER_TYPE,
REACT_PROVIDER_TYPE,
REACT_STRICT_MODE_TYPE,
REACT_TIMEOUT_TYPE,
} from 'shared/ReactSymbols';
function getComponentName(fiber: Fiber): string | null {
@@ -43,6 +44,8 @@ function getComponentName(fiber: Fiber): string | null {
return 'Context.Provider';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
case REACT_TIMEOUT_TYPE:
return 'Timeout';
}
if (typeof type === 'object' && type !== null) {
switch (type.$$typeof) {