Great article! One tip tho - ditch the loading boolean state. There is more than loading/done states. Best approach is to have idle/loading/success/error states. More management is required but, it saves users from waiting despite API call has failed.
I'm a Software Developer, with previous experience in Spatial Web Apps(ArcGIS) and Web Design. Right now I am picking up new skills, on my way to become a better Front-End Developer.
Actually, his (Kent's) initial structure is not that bad, in his specific case all he needed to do is a) clear position on error or b) move error check higher that position check, i.e. ensuring error's priority
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article! One tip tho - ditch the loading boolean state. There is more than loading/done states. Best approach is to have idle/loading/success/error states. More management is required but, it saves users from waiting despite API call has failed.
This article by Kent is great explanation why:
kentcdodds.com/blog/stop-using-isl...
ahah, I was about to post this, well played.
I wish people would stop quoting Kent C Dodds.
Why is that?
Great tip, I will look into this article! Thanks a ton!!!
Actually, his (Kent's) initial structure is not that bad, in his specific case all he needed to do is a) clear position on error or b) move error check higher that position check, i.e. ensuring error's priority