I have to compose several API requests, I am using redux.
For the sake of simplicity let's say there are 2.
When I obtain the response from request A, I use response.data.param, and make request B.
Should this be done where I make the API requests, making
requestA .then(res => requestB(res.data.param)) Or in the component where I dispatch the actions?
dispatch(A()) .then(res => dispatch(B(res.data.param))) or in the actions?
Thank you in advance