未验证 提交 c388048f 编写于 作者: A Antonio Pitasi 提交者: 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
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册