簡單來說applyMiddleware是使action中能做更多的事情,如同去賦予執行action有能力在中間去多執行function,不同只是傳遞資料參數,thunk則在中間扮演著處理非同步問題。 Thunk應用增加延遲2秒 const { createStore, applyMiddleware } = Redux; const { Provider, connect } = ReactRedux const thunk = ReduxThunk.default const Increment = () =>{ return...