Unverified Commit c388048f authored by Antonio Pitasi's avatar Antonio Pitasi Committed by GitHub

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
parent c45497e1
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment