File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,10 @@ function updateForwardRef(
220220 nextProps : any ,
221221 renderExpirationTime : ExpirationTime ,
222222) {
223+ // TODO: current can be non-null here even if the component
224+ // hasn't yet mounted. This happens after the first render suspends.
225+ // We'll need to figure out if this is fine or can cause issues.
226+
223227 if ( __DEV__ ) {
224228 if ( workInProgress . type !== workInProgress . elementType ) {
225229 // Lazy component props can't be validated in createElement
@@ -415,6 +419,10 @@ function updateSimpleMemoComponent(
415419 updateExpirationTime ,
416420 renderExpirationTime : ExpirationTime ,
417421) : null | Fiber {
422+ // TODO: current can be non-null here even if the component
423+ // hasn't yet mounted. This happens when the inner render suspends.
424+ // We'll need to figure out if this is fine or can cause issues.
425+
418426 if ( __DEV__ ) {
419427 if ( workInProgress . type !== workInProgress . elementType ) {
420428 // Lazy component props can't be validated in createElement
Original file line number Diff line number Diff line change @@ -449,17 +449,6 @@ function mountWorkInProgressHook(): Hook {
449449
450450 if ( __DEV__ ) {
451451 ( hook : any ) . _debugType = ( currentHookNameInDev : any ) ;
452- if (
453- currentlyRenderingFiber !== null &&
454- currentlyRenderingFiber . alternate !== null
455- ) {
456- warning (
457- false ,
458- '%s: Rendered more hooks than during the previous render. This is ' +
459- 'not currently supported and may lead to unexpected behavior.' ,
460- getComponentName ( currentlyRenderingFiber . type ) ,
461- ) ;
462- }
463452 }
464453 if ( workInProgressHook === null ) {
465454 // This is the first hook in the list
You can’t perform that action at this time.
0 commit comments