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!
Frontend engineer. Enthusiast of just-in-time learning and learning by teaching as well as deep work concept. Sharing coding tips & my thoughts on dev work.
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!
Yes, when you first hear about it is sounds strange but then you realise it really makes sense.