Live data from Hacker News

Why we chose Vue.js over React

pixeljets.com

141–150 of 267 posts

Re: Why we chose Vue.js over React

#141
post #112

Earlier quoted context omitted.

JSX actually makes it more intuitive than that by having 0 reason for even needing to know when to use square brackets vs parenthses. It's simply curly braces and vanilla JS

this is a different statement than the sentence i responded to. square or round just indicates the direction of the binding. everything in angular is also vanilla js.

Wait, square brackets/parens indicates data binding direction in vanilla js? Huh?

Re: Why we chose Vue.js over React

#142
post #117

Earlier quoted context omitted.

> One of the most impressive thing about Vue.js was the ability of the framework to enter a field saturated with dozens of options, that was becoming dominated by a well-resourced oligopoly (Angular, React), and still win over developers jaded from Javascript-fatigue. When it comes to simple solutions that do no require a build step, the field is not that crowded. A built step should be optional, not necessary to use…

Is that true? I mentioned somewhere else that being able to use vue.js without a compile step was a breath of fresh air, but I was informed that you can also use React as a drop in library without any kind of compile/transpile/task runner. I assumed the person knew what they were talking about, but I never to research it. So now I wonder what is true. Can react be used as a drop in library like vue.js?

It certainly can, but the current mindshare is certainly against that (for various reasons). JSX can be used with just dropping in a second library, but performance is impacted (it has to do the compilation on the fly). If you want to use the ES2015+ features of React, you'll need a build step in between due to lack of browser support.

Re: Why we chose Vue.js over React

#143
post #96

Earlier quoted context omitted.

I didn't so much read it as a negative, it's just that readers unfamiliar with the projects may think that "Chinese stack" means 1) code/issues are in Chinese and/or 2) the main contributor base is located in China. I've been a long time user of Yii1 and Yii2. Qiang has created 3 PHP Frameworks between 2004-2015: PRADO, Yii1, and Yii2. At one point he was on a >700 day commit streak with work on Yii2. I can't blame h…

I agree with you, and I definitely do not blame Qiang on choosing his way. I just miss him as Yii2 contributor and visionaire because that could make a real competitor to Laravel some day, in terms of community, and popularity across US and Europe. Right now Yii2 seems to move in direction of becoming a niche framework for Eastern Europe and parts of China, instead.

I agree, I miss Qiang's visionary leadership on the project also. Given his history of building frameworks I'd say there's a good chance of him doing another. It may not be PHP next time, though.

I wonder if Yii2 adoption moving more towards Eastern Europe and China is more a macro trend of PHP in general. I feel like US firms are typically choosing other languages when starting new projects based off postings and job boards I've seen recently. Maybe my view is tainted from reading too much HN though, PHP doesn't get much love here...

Re: Why we chose Vue.js over React

#144
post #135
post #43

I hope I don't get downvoted for asking this but is React going out of fashion already? A lot of the talk about it was "React is here to stay" or "React is as permanent as JS itself" but now this is the second or third time people seem to be going for Vue instead. What happened?

I can't see React going away soon. It really does work well, and a lot of the author's problems aren't not unsolvable problems. Some are so easy to solve that many people probably never thought of them as problems (Micro components and forms have never been an issue for me.) The only real issue that I agree about is the excessive typing, but that seems like an adequate trade-off. His complaints about pure functions a…

Yeah, we recently had a co-worker complain about immutability ("it just exists to be a pain in my ass"). I asked to examine his code and sure enough, pointed out that if he mutated the variable it would have created bugs in other chunks of code.

Re: Why we chose Vue.js over React

#145
post #117

Earlier quoted context omitted.

> One of the most impressive thing about Vue.js was the ability of the framework to enter a field saturated with dozens of options, that was becoming dominated by a well-resourced oligopoly (Angular, React), and still win over developers jaded from Javascript-fatigue. When it comes to simple solutions that do no require a build step, the field is not that crowded. A built step should be optional, not necessary to use…

Is that true? I mentioned somewhere else that being able to use vue.js without a compile step was a breath of fresh air, but I was informed that you can also use React as a drop in library without any kind of compile/transpile/task runner. I assumed the person knew what they were talking about, but I never to research it. So now I wonder what is true. Can react be used as a drop in library like vue.js?

So long as you don't use JSX you certainly never need to transpire. I believe there is also a shim to do client side jsx parsing but is not encouraged for use with prod code

Re: Why we chose Vue.js over React

#146
post #34
post #11

One of the most impressive thing about Vue.js was the ability of the framework to enter a field saturated with dozens of options, that was becoming dominated by a well-resourced oligopoly (Angular, React), and still win over developers jaded from Javascript-fatigue. The give-a-shit factor from Evan (the creator) is extremely high and was key to its success. Inspiration for anyone building a product in an established…

The reason for its success is good documentation and simplicity. Anything like this aims to empower users, and get the fuck out of the way and let them do their work has a space no matter how crowded the market. Angular and React want you to do things their way and therefore get in the way, and then make you do a bunch of work to make things work their way. I have a PHP app that I rigged up using Vue.js. Took two day…

Maybe it's origins too. React and Angular are massive and high marketing products. The viral spread is organic but not self emergent, unlike vue where users kept going back to it and talk about it naturally; because it's "good enough" and more humane in it's structure and interface.

Re: Why we chose Vue.js over React

#147
post #54

I've used Vue pretty much daily over the last year in a fairly complex app (some 150+ components, Vuex store with 100+ actions, full client side router navigation) and it has been pretty pleasant. I even contribute a nominal amount to the Patreon campaign. However, the upgrade path from v1 to v2 is not a quick undertaking. Certain changes require a revisit to practically all components (e.g. change of 'ready' to 'mou…

I just heard about vuex, any curated resources about it ?

Re: Why we chose Vue.js over React

#148
post #75

I am still unsure if there is a legit use case for Vue or React over plain HTML+CSS+JS. I can understand the use case for React native. To build native applications on multiple platforms. But what is the use case for React, Angular, Vue etc? Can somebody give a minimal example?

Not sure what you mean by "legit use case", because you could write just about anything in vanilla, but for React specifically the value of using it comes from state management.

By explicitly defining what is state and when you change it the application becomes largely pure/functional and this has a tendency to both decrease bugs and make the application easier to reason about.

You could do that in Vanilla as well, but as your apps grow React or whatever.js generally is ready to grow with you, whereas your homebrew solution may not be.

Re: Why we chose Vue.js over React

#149
One small point to add here. Evan You is a pretty amazing individual, but he is no longer alone. There is a core team of six members.

I know because the guy who got me interested in Vue.js, Chris V. Fritz, lives in the Lansing, Michigan area and is responsible for the excellent docs on Vue.

I haven't been able to locate a list online but I know there's a core member in Paris and another one in Japan.

Re: Why we chose Vue.js over React

#150
post #45

Out of curiosity, one reason the author mentions (and I know, it's not his selling point) which I've seen others reiterate is that React's render() method doesn't support if statements. I know you can write something like the code below in React, so what exactly does that criticism refer to? function Home(props) { return ( HELLO Duis a turpis sed lacus dapibus elementum sed eu lectus. { (() => { if (props.location.qu…

Yeah, it's possible in React do to it. But compare that to how Vue handles conditionals: HELLO Duis a turpis sed lacus dapibus elementum sed eu lectus. You specified a home query: {{location.query.home}} No home query was specified I don't know about you, but to me this code is 100% more readable than the React example you gave.

It's strange to me to embed conditions in attributes - particularly the v-else case in a different tag. It requires several visual scans of the block of code to determine what's going on.

In my opinion the following requires less cognitive overhead:

    function Home(props) {
      var query = props.location.query.home ?
        ( 

You specified a home query: { props.location.query.home }

) : (

No home query was specified.

); return ( HELLO

Duis a turpis sed lacus dapibus elementum sed eu lectus.

{query} ); }
Post reply on HN