Wow, now that I understand state machines, I can't help but see them
Wow, now that I understand state machines, I can't help but see them. I'm looking at code from last week and going:
"Ah! These 7 state variables can be replaced by a single status variable!" 🔥
No more separate isLoading, isError, isSaving...Just status. 🤓
Simple question to ask: Are some of these states mutually exclusive? In other words, would it be illogical for these states to be true at the same time?
That's a sign. Moving to a single "status" variable makes impossible combinations, impossible.