Skip to content

Commit

Permalink
Fix bug introduced by double-rendering Functions using hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jan 24, 2019
1 parent 3bf088c commit 6ac4104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function updateForwardRef(
) {
// Only double-render components with Hooks
if (workInProgress.memoizedState !== null) {
renderWithHooks(
nextChildren = renderWithHooks(
current,
workInProgress,
render,
Expand Down Expand Up @@ -567,7 +567,7 @@ function updateFunctionComponent(
) {
// Only double-render components with Hooks
if (workInProgress.memoizedState !== null) {
renderWithHooks(
nextChildren = renderWithHooks(
current,
workInProgress,
Component,
Expand Down Expand Up @@ -1252,7 +1252,7 @@ function mountIndeterminateComponent(
) {
// Only double-render components with Hooks
if (workInProgress.memoizedState !== null) {
renderWithHooks(
value = renderWithHooks(
null,
workInProgress,
Component,
Expand Down

0 comments on commit 6ac4104

Please sign in to comment.