Skip to content

Commit

Permalink
feat: support 16.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Mar 7, 2019
1 parent 94d1379 commit 38b63cd
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/webpack/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,9 @@ var hotCompareElements = function (oldType, newType) {
return oldType === newType
};
var hotCleanupHooks = function () {
firstCurrentHook = null;
currentHook = null;
firstWorkInProgressHook = null;
workInProgressHook = null;
nextWorkInProgressHook = null;
remainingExpirationTime = NoWork;
componentUpdateQueue = null;
sideEffectTag = 0;
if (typeof resetHooks !== 'undefined') {
resetHooks();
}
}
var ReactDOM = {
evalInReactContext: function (injection) {
Expand All @@ -67,9 +61,14 @@ var ReactDOM = {
hotRenderWithHooks: function (current, render) {
hotCleanupHooks();
firstCurrentHook = nextCurrentHook = current !== null ? current.memoizedState : null;
ReactCurrentDispatcher$1.current = nextCurrentHook === null ? HooksDispatcherOnMountInDEV : HooksDispatcherOnUpdateInDEV;
if (typeof nextCurrentHook !== 'undefined' && typeof ReactCurrentDispatcher$1 !== 'undefined') {
nextCurrentHook = current !== null ? current.memoizedState : null;
if(typeof firstCurrentHook !== 'undefined') {
firstCurrentHook = nextCurrentHook;
}
ReactCurrentDispatcher$1.current = nextCurrentHook === null ? HooksDispatcherOnMountInDEV : HooksDispatcherOnUpdateInDEV;
}
var rendered = render();
Expand Down

0 comments on commit 38b63cd

Please sign in to comment.