DEV Community

Discussion on: Fetching data from an api using React/Redux

Collapse
 
markusclaus profile image
Markus Claus

Hey Gabriele,

thanks for the tip. I know middlewares like yours. I used another one in a project recently. Was a real timesaver.

I will checkout yours for sure.

Collapse
 
gabrielecimato profile image
Gabriele Cimato

Any you would recommend to others out there ?

Thread Thread
 
markusclaus profile image
Markus Claus

Recommend? Not really. I used redux-promise and redux-action to achieve something like your middleware does.

In small applications it was great (as I think your middleware will be) but in larger scale applications there were cases where the thunks got complicated and I had to get rid of all the middlewares I found and do it from scratch (or with my own middleware in that case)

Thread Thread
 
gabrielecimato profile image
Gabriele Cimato

That's interesting! I used this for a medium/large codebase and we were fine so if you have a minute to bring up a complicated Case that made those middlewares unhelpful that would be great! I'm curious to see if there's a way I can adapt this one too not intricate use cases.

Thread Thread
 
shaka60hp profile image
Pablo San Juan

Hi Gabriele, I'm learning about your middleware here,
Do you use it INSTEAD of thunk?