From 6670512082e1c83de535f3b9ddb3425fa4fb8bc5 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 16 Mar 2019 01:04:04 +0000 Subject: [PATCH] Remember eagerReducer even if there is nothing in the queue --- packages/react-reconciler/src/ReactFiberHooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js index 03e4533602501..23924a28a1fc6 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.js +++ b/packages/react-reconciler/src/ReactFiberHooks.js @@ -742,9 +742,9 @@ function updateReducer( hook.baseUpdate = newBaseUpdate; hook.baseState = newBaseState; - queue.eagerReducer = reducer; queue.eagerState = newState; } + queue.eagerReducer = reducer; const dispatch: Dispatch = (queue.dispatch: any); return [hook.memoizedState, dispatch];