@@ -42,7 +42,6 @@ import {
4242import { NoFlags , Placement , StaticMask } from './ReactFiberFlags' ;
4343import { ConcurrentRoot } from './ReactRootTags' ;
4444import {
45- IndeterminateComponent ,
4645 ClassComponent ,
4746 HostRoot ,
4847 HostComponent ,
@@ -248,19 +247,10 @@ export function isSimpleFunctionComponent(type: any): boolean {
248247 ) ;
249248}
250249
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 ) ;
264254}
265255
266256// This is used to create an alternate fiber to do work on.
@@ -351,7 +341,6 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
351341 workInProgress . _debugInfo = current . _debugInfo ;
352342 workInProgress . _debugNeedsRemount = current . _debugNeedsRemount ;
353343 switch ( workInProgress . tag ) {
354- case IndeterminateComponent :
355344 case FunctionComponent :
356345 case SimpleMemoComponent :
357346 workInProgress . type = resolveFunctionForHotReloading ( current . type ) ;
@@ -492,7 +481,7 @@ export function createFiberFromTypeAndProps(
492481 mode : TypeOfMode ,
493482 lanes : Lanes ,
494483) : Fiber {
495- let fiberTag = IndeterminateComponent ;
484+ let fiberTag = FunctionComponent ;
496485 // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
497486 let resolvedType = type ;
498487 if ( typeof type === 'function' ) {
0 commit comments