But either way, in both syntaxes you need to learn the syntax for conditionals and loops.
-
-
I like to keep conditionals and loops in real js whenever possible. Turns out there is already a syntax for both! :)
1 reply 0 retweets 5 likes -
Replying to @stubbornella @wycats and
One of the benefits to having templates in the js is that you write more real js and less magic... imo
3 replies 0 retweets 5 likes -
Replying to @stubbornella @youyuxi and
Fair enough. I think you might be undercounting the cognitive costs to some in mixed JS/XML but again YMMV.
1 reply 0 retweets 1 like -
Replying to @wycats @stubbornella and
I think the level of adoption speaks for itself.
1 reply 0 retweets 1 like -
Replying to @HenrikJoreteg @stubbornella and
Handlebars is extremely popular too. As I said, different strokes for different folks.
1 reply 0 retweets 4 likes -
Replying to @wycats @HenrikJoreteg and
Overall I agree that template syntax is indifferent. The browser providing a way to dynamically merge two DOM trees is the primitive we need
4 replies 0 retweets 10 likes -
That's very arguable. Creating the second tree is wasteful
2 replies 0 retweets 2 likes -
Replying to @justinfagnani @samccone and
Object pooling and POJOs, its hardly a "waste". There are very simple optimizations that can make it fine.
1 reply 0 retweets 0 likes -
More wasteful than a direct update of the dynamic part that changed.
1 reply 0 retweets 0 likes
We'll probably spend the next year or two debating what's "fine" while people complain that web apps are too slow in emerging markets.
-
-
Replying to @wycats @justinfagnani and
I have nothing against VDOM but let's not bake it into the structure of the web.
1 reply 0 retweets 5 likes -
Replying to @wycats @justinfagnani and
I agree here. The only virtual DOM concept I think might be useful in the DOM is the concept of "keys" on Nodes in collections.
0 replies 0 retweets 4 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.