DEV Community

Discussion on: Displaying a css spinner on ajax calls with fetch api

Collapse
 
wangonya profile image
Kelvin Wangonya

Didn’t know about promise.catch. I’ll check it out. Thanks!

Collapse
 
lcherpit profile image
Laurent C.

At least use ".finally()" to hide spinner at the end of process. Indeed, ".then()" will never called on error and spinner will stay stuck.