state-machines

2022・06・15

Whenever you set boolean flags like:

🏳️ setIsLoading(true)
🏳️ setIsActive(true)
🏳️ setHasFailed(true)

You're not avoiding a state machine. You're creating an implicit one, where the transition function lives in your head, and is hopefully the same as your teammates (unlikely).

— David K. 🎹 (@DavidKPiano) June 15, 2022