DEV Community

Discussion on: Fetch - from simple to scalable implementation

Collapse
 
tqbit profile image
tq-bit

A solid article, well done. I find it interesting that you favored nested functions over classes. Did you do that for the sake of ease or did you have some other motivation?

Also, perhaps as an additional interation, have you considered adding some kind of internal progress indicator? You can use the Response interface of the fetch API to achieve such behavior.

developer.mozilla.org/en-US/docs/W...

Collapse
 
nombrekeff profile image
Keff

Thanks, happy you liked it!

Good question, actually it came out that way. I started by implementing the simplest function to fetch data, and then descended down that way. Though I think it's also easier to follow than with OOP. I also don't do much functional programming so it's always nice to refresh on it a bit :)

I will also be doing an article, mostly the same concept but with oop. And I might try including the progress indicator, I've not used it much with fetch though as I usually use other libraries around it for real projects.

Cheers!