DEV Community

Discussion on: Status instead of isLoading boolean?

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

I actually ran into this situation at work recently and a colleague suggested using an enum instead of separate loader/status booleans. It definitely made things cleaner and the logic easier to follow!

Collapse
 
joannaotmianowska profile image
Joanna Otmianowska • Edited

Yes, when you first hear about it is sounds strange but then you realise it really makes sense.