Follow up post? :)

I personally prefer the Promises approach. Since every .then(...) is basically calling a function you can be creative there in terms or reusability and legibility.

For example while using axios you most of times have to do kinda the same post request operations to check status, get response data, etc. So, why not encapsulate those on its own function.

This way I will have three pure functions and only one with side effects. Easier to test, easier to read. But, performance?? Never did a benchmark or found one that addresses that. Any suggestions?

Software Engineer @ Coalition Inc., Miami FL

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store