4 ms·
Why use templating at all? Just use virtual DOM: https://github.com/Matt-Esch/virtual-dom https://github.com/Matt-Esch/virtual-dom Server-side rendering exampl
by malandrew 12y ago
Why use templating at all? Just use virtual DOM:
https://github.com/Matt-Esch/virtual-dom https://github.com/Matt-Esch/virtual-dom
Server-side rendering example:
https://github.com/Raynos/mercury/blob/master/examples/server-rendering/server.js https://github.com/Raynos/mercury/blob/master/examples/serve...
It feels more tedious at first if you try using hyperscript the same way as traditional templating language. However when you start using higher order functions and composing your templates from smaller functions, it becomes remarkably easy to keep DRY the code that produces the HTML in your app.