DEV Community


Discussion on: VueJS - Reusable Data Fetcher Component

horaciosystem profile image
Horacio Alexandre Fernandes • Edited

Hello Pablo! Very good article, pretty well detailed and I'm sure it will give a lot of insights to someone reading it.
An improvement I'd like to suggest to this API is using a 'status' variable, an enum, with the possible states (thinking in a finite state machine) to avoid some gaps (impossible states) that can occur and can make it trickier to deal with.
I'd like to recommend this article: that complies a good explanation for why.
Anyway, thank you so much for the article.