News for hackers. Stuff that matters.
Re:useStateMachine: A ½ kb state machine hook for React by RobertKerans on Sunday May 23, 2021 @08:42AM (#27254618)
This is important, and it's probably the main reason I like using them so much. But then surely the comeback is that what I'm then attempting to do is produce a diagram in code, when I could just write the diagram on paper, check it, then write some (possibly simpler) code. Not in all cases, naturally, but often?
Re:useStateMachine: A ½ kb state machine hook for React by runawaybottle on Sunday May 23, 2021 @02:31PM (#27257341)
Yeah, I think you articulated that better than a lot of us here. That, in a sense, your diagram becomes your psuedo-code, or even further, your actual implementation.

My initial defensive impulse to this topic was mostly to take a stand against frontend code that is becoming increasingly obtuse over the years.