Hacker News new | ask | show | jobs
by nwienert 1977 days ago
Yea, it's definitely a workaround for not having algebraic effects, you can basically think of it as a yield.

Of course ideally the language would have it first class, it doesn't change the fact that they are immensely useful. Having composable stateful logic that always handles side-effects is incredibly useful, and it works really well within the immutable data / top down data flow model of React.

I'd love to hear the alternatives, as I spent years researching and working on many (Redux and FRP/reactions) and they're simply not as nice.