Skip to content

Commit

Permalink
fix 15301 15219
Browse files Browse the repository at this point in the history
  • Loading branch information
Jokcy committed Apr 3, 2019
1 parent 4d5cb64 commit 732ec61
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/react-reconciler/src/ReactFiberHooks.js
Expand Up @@ -349,17 +349,17 @@ export function renderWithHooks(
hookTypesUpdateIndexDev = -1;
}

// The following should have already been reset
// currentHook = null;
// workInProgressHook = null;
// when `Component(props, refOrContext)` throws and being catched in `cDC`, the following will not be reset
currentHook = null;
workInProgressHook = null;

// remainingExpirationTime = NoWork;
// componentUpdateQueue = null;
remainingExpirationTime = NoWork;
componentUpdateQueue = null;

// didScheduleRenderPhaseUpdate = false;
// renderPhaseUpdates = null;
// numberOfReRenders = 0;
// sideEffectTag = 0;
didScheduleRenderPhaseUpdate = false;
renderPhaseUpdates = null;
numberOfReRenders = 0;
sideEffectTag = 0;

// TODO Warn if no hooks are used at all during mount, then some are used during update.
// Currently we will identify the update render as a mount because nextCurrentHook === null.
Expand Down

0 comments on commit 732ec61

Please sign in to comment.