loading...

re: Opinionated React - Use Status Enums Instead of Booleans VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I did the same! But like you said, having to remember what all the numbers represented was difficult.
 

I actually tried using constants. NOT_STARTED, LOADING, etc. But enums was still better because of auto-complete and working with interfaces. Taking an enum type as the status is just more descriptive than an int, whether it's written as a constant or otherwise lol

code of conduct - report abuse