Hacker News new | past | comments | ask | show | jobs | submit login

OP here! Thanks for putting together the Svelte demo. I'm a big fan of Svelte too, and I concur... everything I've tried to build with it so far has felt simple and easy compared to React.

FWIW this post wasn't written around the idea that modals in React are so hard they require a state machine to get them right, more that I wanted a minimal-ish example to show off how to build something with a state machine, and ideally something real-world-ish, but that wouldn't require special domain knowledge.

It's always a tough balance to strike when choosing examples... too simple and they come off as overengineering, too complex and you lose the forest for the trees. Thanks for checking it out, at any rate!




I think some people just don’t get the point of state machines, whether they understand them or not. Much like people who think static typing is just cognitive overhead, or things like exhaustive pattern matching just get in the way.

To me these things are indispensable tools for keeping users happy by preventing me from breaking even more shit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: