How to dispatch multiple actions one after another

前端 未结 3 1752
借酒劲吻你
借酒劲吻你 2021-02-05 05:19

In my react / redux application I often want to dispatch multiple actions after another.

Given the following example: After a successful login I want to store the user d

3条回答
  •  渐次进展
    2021-02-05 05:43

    redux-thunk is exactly what you are looking for. I consider it very good practice.

    To answer your question, indeed when the first dispatch returns the state is already changed by the called reducers.

提交回复
热议问题