被我標記起來的那個說法我覺得有點不太對,你可以把 middleware 的 return result 註解掉,是不是還能動。

實際上給 reducer 使用的 state 是儲存在 createStore 裡面的 currentState ,你可以看看原始碼的 dispatch,246 行:

currentState = currentReducer(currentState, action)

--

--

每天進步一點點,在終點遇見更好的自己。

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store