From c388048f3efebff6cf6bdca4a41939e55975f91b Mon Sep 17 00:00:00 2001 From: Antonio Pitasi Date: Thu, 24 Sep 2020 21:35:46 +0200 Subject: [PATCH] fix(examples/with-redux-wrapper): wrong initial state (close #17299) (#17335) Wrong variable was being checked for the hydrate action on redux. This was causing the count to be reset to 0 instead of being 1 when initially loading index.js page. Fixes #17299 --- examples/with-redux-wrapper/store/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/with-redux-wrapper/store/store.js b/examples/with-redux-wrapper/store/store.js index 8f3b62771d..52a52a8436 100644 --- a/examples/with-redux-wrapper/store/store.js +++ b/examples/with-redux-wrapper/store/store.js @@ -23,7 +23,7 @@ const reducer = (state, action) => { ...state, // use previous state ...action.payload, // apply delta from hydration } - if (state.count) nextState.count = state.count // preserve count value on client side navigation + if (state.count.count) nextState.count.count = state.count.count // preserve count value on client side navigation return nextState } else { return combinedReducer(state, action) -- GitLab