Lock us all in a room and don't let us out until the DOM has VDOM
-
-
It does with statically analyzable tokens and expressions passed to them (aka Vue/angular directives)
-
Yes, if you eliminate the "just JS" part and add conditionals and loops to the template language, it works.
-
I also think jsx has some very powerful composition tech. So using both interchangably is very very nice. (Like pure/func to assign props)
-
The powerful composition comes from functions. Which a good template language can have.
-
Mehhh Template v Template language
-
I don't get it.
-
Twig/Underscore: Templating Language Template (in my mind): something that could be still successfully parsed with a HTML parser
-
Aka no extraneous syntax etc
- 14 more replies
New conversation -
-
-
let items = http://list.map (item => jsx`<li>${item}</li>`); return jsx`<ul>${items}</ul>`
-
This is the sort of very simple thing people do all the time and like as "just JS" that starts to make it hard to do this optimization.
-
That works great in lit-html, what's the difficulty?
-
It means you can't statically see the conditional and have to compare more.
-
The full optimization does no comparing at update time of anything, and also doesn't keep any repr at all of the anything other than {{}}
-
I'm not exactly sure what comparing you're referring to, but if there a conditional in the template you have to execute it.
-
You execute it once when appending and only check if the condition is still valid thereafter.
-
Yep, that's what lit-html does
End of conversation
New conversation -
-
-
all solved in hyperHTML and intents you can define to bring anything you want to the dynamic parts of the template you define.

-
I looked into hyperHTML and it doesn't seem to make it any easier to compile to bytecode. Can you explain what is special?
-
For example: return render`<p>${http://foo.map (mapper)}</p>` Without types, there's no way of knowing what type of object foo is
-
It could be an array, or it could be any other object, it could even have proxies on it. I don't understand how hyperHTML solves these probs
- 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.
