Dispatching further actions when handling actions

前端 未结 2 1675
礼貌的吻别
礼貌的吻别 2021-02-08 03:52

I have a scenario where I feel like I need to dispatch an action in response to another action, and I don\'t know the best way to sort it out.

An action is dispatched in

2条回答
  •  [愿得一人]
    2021-02-08 04:26

    Usually, the solution to this problem is to to back up and look at the original action, and to waitFor the value that you are trying to send in the second action, if a derived value is required.

    So in this case you would respond only to 'auth' in both the UserStore and the RouteStore.

提交回复
热议问题