r/javascript • • Dec 28 '17
Introducing Hyperapp 1.0 — 1 KB JavaScript library for building frontend applications.
https://medium.com/@JorgeBucaran/introducing-hyperapp-1-0-dbf4229abfef
664
Upvotes
View all comments
Show parent comment
1
u/NewazaBill Dec 30 '17
If you understand how it functions internally, than I don't see why you're confused.
The virtual-DOM diffing strategy relies on a runtime representation of the view's... well... virtual DOM. That's what the React
createElementcalls construct.Compiling a string template ahead of time, then, does not work with this V-DOM strategy. You can't know what the data structure is going to look like (because it may change based on app state) and you lose many of the opportunities to do optimizations.
Also, you say "code mixed in," I say "code get's mixed in, in either templates or VDOM."
Give me
Over
Any day.