@@ -42,7 +42,6 @@ import {
42
42
import { NoFlags , Placement , StaticMask } from './ReactFiberFlags' ;
43
43
import { ConcurrentRoot } from './ReactRootTags' ;
44
44
import {
45
- IndeterminateComponent ,
46
45
ClassComponent ,
47
46
HostRoot ,
48
47
HostComponent ,
@@ -248,19 +247,10 @@ export function isSimpleFunctionComponent(type: any): boolean {
248
247
) ;
249
248
}
250
249
251
- export function resolveLazyComponentTag ( Component : Function ) : WorkTag {
252
- if ( typeof Component === 'function' ) {
253
- return shouldConstruct ( Component ) ? ClassComponent : FunctionComponent ;
254
- } else if ( Component !== undefined && Component !== null ) {
255
- const $$typeof = Component . $$typeof ;
256
- if ( $$typeof === REACT_FORWARD_REF_TYPE ) {
257
- return ForwardRef ;
258
- }
259
- if ( $$typeof === REACT_MEMO_TYPE ) {
260
- return MemoComponent ;
261
- }
262
- }
263
- return IndeterminateComponent ;
250
+ export function isFunctionClassComponent (
251
+ type : ( ...args : Array < any > ) => mixed ,
252
+ ) : boolean {
253
+ return shouldConstruct ( type ) ;
264
254
}
265
255
266
256
// This is used to create an alternate fiber to do work on.
@@ -351,7 +341,6 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
351
341
workInProgress . _debugInfo = current . _debugInfo ;
352
342
workInProgress . _debugNeedsRemount = current . _debugNeedsRemount ;
353
343
switch ( workInProgress . tag ) {
354
- case IndeterminateComponent :
355
344
case FunctionComponent :
356
345
case SimpleMemoComponent :
357
346
workInProgress . type = resolveFunctionForHotReloading ( current . type ) ;
@@ -492,7 +481,7 @@ export function createFiberFromTypeAndProps(
492
481
mode : TypeOfMode ,
493
482
lanes : Lanes ,
494
483
) : Fiber {
495
- let fiberTag = IndeterminateComponent ;
484
+ let fiberTag = FunctionComponent ;
496
485
// The resolved type is set if we know what the final type will be. I.e. it's not lazy.
497
486
let resolvedType = type ;
498
487
if ( typeof type === 'function' ) {
0 commit comments