HNHacker News
TopNewBestAskShowJobs

ipntu

10 karma · joined June 29, 2018

submissionscomments
ipntu··on Vue.js: the good, the meh, and the ugly

    This is patently not so.
Maybe if you are used to JSX.

    - three different html-like attributes
: and @ are just shorthand for v-bind and v-on attributes.

v-bind and v-on (and v-if) accept regular javascript, and it's not just expressions... you can use `active = true` to change a data value, for instance.

The only exception is v-for, as you mentioned, but it is close enough to ES6 for syntax to make sense, at least IMO.

    - three different scripting languages in templates (two Javascript-like, one Javascript, but only expressions)
This is splitting hairs a bit, isn't it? Apart from v-for, you can write pretty much anything you want in the other two.

    - one scripting language for controller/model which actually breaks JS assumptions (about what `this` is, for example) by magiacally hoisting some (but not all) properties of an object
You mean the script part of components? Do you have any examples of that?
ipntu··on Vue.js: the good, the meh, and the ugly
A shame that this answer was downvoted on a technicality.

As other people mentioned, Vue indeed doesn't have two-way binding, and v-model doesn't have the pitfalls that Angular had. It is just syntax sugar.

Maybe it's about time Vue people remove the mention of two-way binding from their websites, since it is being used to attack the framework. I've seen that in other discussions here in Hacker News.

ipntu··on Vue.js: the good, the meh, and the ugly
> Personally I make heavy use of higher order components, and I find I rarely exceed a component tree height of three.

That's my experience as well. If you use a deep component hierarchy you have bigger problems than those solved by Redux, VueX or the Context API.

Higher order components or even simple functional components are really underrated when it comes to making your application simpler to reason about and to maintain.

ipntu··on Vue.js: the good, the meh, and the ugly
The amount of special cases in Vue templating syntax is comparable to the special cases and gotchas of JSX. It's not much, really.

I personally find Vue templating syntax much easier to follow than JSX, but that's because I'm used to it. I honestly believe that's how React users feel about JSX too.

ipntu··on Vue.js: the good, the meh, and the ugly
> In my experience, the fact that React is a simple view library makes it the perfect choice for small shops.

Vue is also a simple view library.

You keep bringing up Angular, as if Vue has something to do with it. Vue is so much closer to React than to Angular.

> You're taking on considerable risk when you use a technology without a vested backer (Facebook is heavily vested in React, look at Angular 1 for an example of a framework with a big backer than is not vested, the API was completely broken in a rewrite). Smaller frameworks also suffer from a lack of sustained development.

Sorry, but that sounds a lot like rationalization and wishful thinking, written purely to make React look good and anything else look bad.

Vue also has backers that contribute financially, a large community using it and sustained development. The fact that it isn't as big as React doesn't make it unworthy of existing or unable to provide the same technical benefits as React.