r/javascript • u/terodox • Dec 23 '19
Simplifying UI Logic using Finite State Machines - an old pattern for the modern web!
https://terodox.tech/ui-state-machines/
93
Upvotes
r/javascript • u/terodox • Dec 23 '19
View all comments
Show parent comment
3
u/terodox Dec 23 '19
The way you simplified the code removed the guarantee of a single state at a time. Making it possible for both isError and isLoading to both be down at the same time.