←back to thread

217 points palmfacehn | 1 comments | | HN request time: 0s | source
Show context
mvdtnz ◴[] No.45107198[source]
Reading the first example I'm not really seeing what gains I get from this. It's just as much work to create a table row using the template as doing it from scratch.
replies(6): >>45107214 #>>45107398 #>>45107429 #>>45107514 #>>45108016 #>>45110197 #
1. Spivak ◴[] No.45107514[source]
I agree, this seems more complicated than just defining your template in JS. You have to use JS to interact with them anyway and it's basically a mapping between some well-known strings and a factory to create a DOM node except less flexible. The advantage seems to be only if you don't interact with your templates in JS and use them inline in your HTML.