

Show HN: Weya - Fast CoffeeScript markup - vpj
http://vpj.svbtle.com/weyacoffee

======
couchand
This looks like a neat little library, and I'm intrigued by the progressive
rendering. But I'm confused about how it handles updates. Do you just rerender
the whole thing? I ask because in some ways this looks similar to, though
somewhat more cumbersome than, developing React in CoffeeScript.

 _So you can’t use enter(), exit() and updates when data changes. But most
users rarely need these features._

I'd argue that if you don't need `enter` or `exit` you probably don't need D3.
It's not a DOM manipulation library, it's a data binding library.

And a note to the mods: there's an extra 'f' in the title.

~~~
vpj
> But I'm confused about how it handles updates. Do you just rerender the
> whole thing?

Here is how I use it in such scenarios:

    
    
      elems = {}
    
      Weya elem: document.body, ->
       for k, v of data
        elems[k] = @div "#{v}"
    
      #when element k changes
      onChange = (k) ->
       elems[k].textContent = "#{data[k]}"
    
    

If the change is more complex Weya can again be used to render the content of
the changed element (not the entire dom).

