Can I dispatch an action in reducer?

前端 未结 4 876
暖寄归人
暖寄归人 2020-11-28 01:44

is it possible to dispatch an action in a reducer itself? I have a progressbar and an audio element. The goal is to update the progressbar when the time gets updated in the

4条回答
  •  情话喂你
    2020-11-28 02:19

    You might try using a library like redux-saga. It allows for a very clean way to sequence async functions, fire off actions, use delays and more. It is very powerful!

提交回复
热议问题