187页最上边理解有误
BetterZxx opened this issue · comments
BetterZxx commented
compose生成的函数参数的执行顺序应该是从右到左,文中说applyMiddelware放在第一个位置是为了优先处理action,应该是为了最后处理action,可以参考redux源码
compose源码注释:
- from right to left. For example, compose(f, g, h) is identical to doing
- (...args) => f(g(h(...args))).
applyMiddleware源码注释: - Because middleware is potentially asynchronous, this should be the first
- store enhancer in the composition chain.