Search code examples
reactjsreduxreact-reduxreact-hooksredux-saga

Redux saga dispatch multi actions in DOM events sequentially


Can I dispatch multiple actions sequentially ?

  dispath({type:'CREATE_PRODUCT', data: product});
  dispath({type:'GET_LIST_PRODUCT'}); //This action must be performed after the previous action(create product) is completed

Solution

  • After searching, my solution is to use promise in combination with redux-saga https://www.npmjs.com/package/@adobe/redux-saga-promise