What are the benefits of using thunk middleware in redux over using regular functions as async action creators? [closed]

泄露秘密 提交于 2019-11-30 07:30:23
acjay

This is very well tread territory. I'd say that it's a common sentiment that async action creators aren't particularly satisfying, but there are good reasons to prefer Redux Thunk to the completely manual approach. But it is just one of a number of possible approaches. See Why do we need middleware for async flow in Redux?.

I think the community will probably settle on something other than Redux Thunk in the long run, but its simplicity makes it a good starting point.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!