Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
core
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web. (by vuejs)
I had no idea that a Vue component is basically a big JS object.
Reminds me of Backbone.js' views: https://backbonejs.org/#View
> The point is that all code starts as simple text, and is parsed and compiled into some lower layer
Yup
> What actually does the compilation is irrelevant.
Nope. It is relevant. For the stuff you put between script tags there's at the very least https://github.com/tc39/ecma262 that you can look at and tell exactly what's going on with your code.
With Vue (and, yes, React and Svelte and Angular): who knows? It might very well evalueate strings at runtime for all we know.
> All of these JS frameworks (React+JSX, Vue+HTML, Angular, Svelte, etc) require template compilation into an actual JS render function before a browser ever runs it,
Yup. It's an additional, different step before it can even get to the browser. The problem with this step is that for most of this code there's not even a coherent specification of what it is, and how it's compiled.
> and Vue's documentation already describes exactly what you can run
It really doesn't. For example, here's the "documentation" on v-for:
Expects: Array | Object | number | string | Iterable
The topic is that all code is text, and everything can be parsed and understood based on specific language grammars, even if they're embedded within each other.
What are you even arguing at this point? This isn't about compilation or strings anymore. You don't like Vue's specific DSL? Or you don't understand it? Or you found a problem with the documentation? Or do you need a full grammar and syntax definition before you can do anything?
It's basically any valid `for..in/of` expression but you can always solve your mystery of "who knows" by just looking at the source code: https://github.com/vuejs/vue-next/blob/master/packages/compi...