garyb / purescript-virtual-dom

Low level virtual-dom bindings for PureScript
MIT License
30 stars 7 forks source link

Offer monadic Blaze-style interface for writing VTrees #2

Closed garyb closed 9 years ago

garyb commented 10 years ago

This could perhaps be a separate project using Free, and then could write interpreters for vtree objects, react components, plain DOM objects, strings, etc.

paf31 commented 10 years ago

Another option would be to just use Monoid instead of Monad.

fluffynukeit commented 9 years ago

The more I use vtree, the more convinced I am that a vtree DSL should be a separate project, akin to how virtual-hyperscript is a different project than virtual-dom (even though they are in the same repo). There are lots of opinionated ways to design an interface that is easy to use and hides all the little quirks of building vtrees manually.

garyb commented 9 years ago

Agreed :) I changed my mind a bit about the direction of this from when I first started working on it - as mentioned in your options PR, I think it's probably more useful to have this as a low level thing that hopefully other people will build on top of.

@bodil's smoulder had a virtual-dom renderer until recently, that could be revived as a seperate library, and @paf31 has scrap-your-markup which would also be well suited to a virtual-dom interpreter at some point.