|
|
|
|
|
by nek4life
2679 days ago
|
|
> and has a very wierd concept of how objects work in JS. What is so weird about it? I personally find Vue vastly more approachable than React is, especially once you have to start writing all the plumbing to get all the libraries you need to go along with it to write a real world app. > ] It's a templating system with its own rules and mini-DSLs that ends up being compiled into JS. Vue has the option to use Webpack to compile html compliant templates to JS functions just like JSX (which BTW is not JavaScript and not HTML compliant and is also a separate concept that needs to be learned as well.) CSS is just another add-on through Webpack when using Single File Components. Nothing really ground breaking here except for the fact that it creates a nice separation of concerns. This is especially true on teams with junior devs or designers. Or with a team that works on a site with mixed MPA and SPA features. |
|
I go a bit in depth here: https://news.ycombinator.com/item?id=17471199
> Vue has the option to use Webpack to compile html compliant templates to JS functions just like JSX
Vue's templates are not HTML-compliant. They are just that: templates. That get compiled to JS anyway.
> JSX (which BTW is not JavaScript and not HTML compliant and is also a separate concept that needs to be learned as well.)
JSX is a very thin DSL on top of Javascript. It's just function calls: https://reactjs.org/docs/react-without-jsx.html
Once you understand that, everything falls into place.
> CSS is just another add-on through Webpack when using Single File Components.
It's not a webpack add-on. It's a part of Vue's templating engine that is essentially CSS-in-JS, they just give you a template to work in.