ckirkendall / kioo

Enlive/Enfocus style templating for Facebook's React and Om in ClojureScript.
Eclipse Public License 1.0
404 stars 39 forks source link

kioo + progressive enhancement #59

Closed johncowie closed 8 years ago

johncowie commented 8 years ago

Do be honest this isn't an issue with kioo, but more of a question: How possible would it be to load templates at runtime instead of compile time?

I'd ideally like to use something like kioo to do progressive enhancement (i.e. receive generated HTML from the server, and then enhance it with JS). In more code-y terms, something like:

(kioo/component (.-body js/document) [:#main]
     {[:h1] (content (:header @data))
      ; ...etc 
       })

Has this not been done because..

Would really appreciate some input before I embark on trying to fill this gap :-p

ckirkendall commented 8 years ago

levand (Luke Vandarhart) is working on a kioo lite that allows just that. There are some performance issues with this approach but he was able to port enlive to Clojurescript. https://github.com/levand/enlive

johncowie commented 8 years ago

Ah ok awesome. Thanks for the pointer, will try and chip in with that effort.