File tree 2 files changed +8
-11
lines changed
packages/react-reconciler/src 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,10 @@ function updateForwardRef(
220
220
nextProps : any ,
221
221
renderExpirationTime : ExpirationTime ,
222
222
) {
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
+
223
227
if ( __DEV__ ) {
224
228
if ( workInProgress . type !== workInProgress . elementType ) {
225
229
// Lazy component props can't be validated in createElement
@@ -415,6 +419,10 @@ function updateSimpleMemoComponent(
415
419
updateExpirationTime ,
416
420
renderExpirationTime : ExpirationTime ,
417
421
) : 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
+
418
426
if ( __DEV__ ) {
419
427
if ( workInProgress . type !== workInProgress . elementType ) {
420
428
// 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 {
449
449
450
450
if ( __DEV__ ) {
451
451
( 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
- }
463
452
}
464
453
if ( workInProgressHook === null ) {
465
454
// This is the first hook in the list
You can’t perform that action at this time.
0 commit comments