chainable-components
chainable-components copied to clipboard
Do notation is awkward
Would it be possible for .Do to accept a generator function?
Unfortunately not, for reasons described here.
I did attempt this in the monad_composition branch. It works great on the first render, but if there's ever a re-render, then it doesn't work, since the generator attempts to continue, rather than re-start from the point of the render. Here's an example of how it's used.
You're welcome to pull & play around with it (I'd love to find a way around this, but don't really see one)