(message)
| 110 | // 现在 store 的 middleware 已经准备好了,再来尝试分发我们的异步 action: |
| 111 | |
| 112 | var asyncSayActionCreator_1 = function (message) { |
| 113 | return function (dispatch) { |
| 114 | setTimeout(function () { |
| 115 | console.log(new Date(), 'Dispatch action now:') |
| 116 | dispatch({ |
| 117 | type: 'SAY', |
| 118 | message |
| 119 | }) |
| 120 | }, 2000) |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | console.log("\n", new Date(), 'Running our async action creator:', "\n") |
| 125 |