From 6ac41048db8689a8d5a9c77fa07e816420d8cbb8 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 24 Jan 2019 15:58:32 -0800 Subject: [PATCH] Fix bug introduced by double-rendering Functions using hooks --- packages/react-reconciler/src/ReactFiberBeginWork.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberBeginWork.js b/packages/react-reconciler/src/ReactFiberBeginWork.js index 9c4a72b7fedcb..e4420d7004e8e 100644 --- a/packages/react-reconciler/src/ReactFiberBeginWork.js +++ b/packages/react-reconciler/src/ReactFiberBeginWork.js @@ -257,7 +257,7 @@ function updateForwardRef( ) { // Only double-render components with Hooks if (workInProgress.memoizedState !== null) { - renderWithHooks( + nextChildren = renderWithHooks( current, workInProgress, render, @@ -567,7 +567,7 @@ function updateFunctionComponent( ) { // Only double-render components with Hooks if (workInProgress.memoizedState !== null) { - renderWithHooks( + nextChildren = renderWithHooks( current, workInProgress, Component, @@ -1252,7 +1252,7 @@ function mountIndeterminateComponent( ) { // Only double-render components with Hooks if (workInProgress.memoizedState !== null) { - renderWithHooks( + value = renderWithHooks( null, workInProgress, Component,