Live data from Hacker News

Vue.js vs. React: what happened in 2017

pixeljets.com

71–80 of 177 posts

Re: Vue.js vs. React: what happened in 2017

#71
post #47

Earlier quoted context omitted.

Ah, that's a bummer. Vue Templates seem wildly regressive to me -- I can't fathom going back to stringly-typed Handlebars wrangling after using JSX/TSX. After looking into this further it seems like Vue Templates also differentiate between values and components. In React I often write components which can take in either: a good example is text which the consumer might want to format. You can easily write the componen…

You can use slots to pass HTML or Components into child components. You can have vue render jsx or templates, but in practice you can make interactive components very simply using templates which are foundationally simpler and easier to grasp than JSX.

How so? In my mind templates and JSX are equally complex from a user standpoint. In fact I'd argue that JSX is simpler because you don't have to invent slots -- it's an obvious side effect of using JavaScript to generate your structure.

Just reading about slot and slot-scope makes me think Vue's reputation for simplicity is overblown.

Re: Vue.js vs. React: what happened in 2017

#72
I personally prefer Vue because it is approachable and easy to adopt. I believe that if Vue embraces PWAs in a pragmatic way that performs and is accessible, it will be top for a while.

At the moment, PWA is not a viable replacement for some cases, but it’s about to explode to everyone.

Re: Vue.js vs. React: what happened in 2017

#73

I think both of them are awesome and have great communities. Especially seeing as webpack has stabilized. If you're a startup, it's tempting for many founders to go in headfirst with a Vue or React. In my opinion, it's rarely necessary, and in the end a lot of the stuff has to be thrown out if underlying foundations change. I see it as web development's version of premature optimization. On the other hand, when I kep…

I disagree. Coming from python, my first foray into web frontend was a SPA for mobile. Both my coworkers convinced me to go right to react + redux (after some bumbling first with more "traditional" ajax). After a few weeks of utter bewilderment, I have to say I really enjoy this stack. Some say it's overkill, but the framework really helps me organize things into cognitive chunks, and makes debugging so much easier.

Ever had a class in school which you hated at the time because it felt super hard, but loved in hindsight because of how much you learned? same sort of vibe. Fight through the pain.

Re: Vue.js vs. React: what happened in 2017

#74

It's a shame there's no first party supported Vue native library, but I suppose that's too much even for Evan.

That might not matter that much. There's still a strong argument for implementing native apps using their own SDKs. There are more developers with experience with them, there is more boilerplate and examples, third party integrations are typically designed for them, and more books and documentation are for them. On the front page of HN today there was a stackshare post about a startup with only three engineers that used a lot of cutting edge tools, but React Native was not one of them.

Re: Vue.js vs. React: what happened in 2017

#75
post #59
post #38

Earlier quoted context omitted.

MobX+React would be just like Vue, but with the benefits of the larger React ecosystem and full type checking with typescript/flow, and the drawback of mandatory build tooling.

It is similar, but it will mean you get off the highway of React "preferred way" - for example, in case you start working with React Native you might have an issue of using different state management solutions for your web and mobile stack - it looks like nobody is using Mobx with RN in serious projects.

Actually we use React+mobx on both our web and RN stacks and it's been great. What we really like is that it is simple and extremely performant since in most cases it automatically updates only the React components that need to be re-rendered based on the state that's been modified.

We jumped directly from a flux-like state management to mobx (skipping Redux) and the development time has gone down significantly as well.

Re: Vue.js vs. React: what happened in 2017

#76
I really don't get the love around vue... I always read the glowing sentiment and go, "Ok, I'm missing something, let me go back to the vue.js docs and see what's good"

Things that are a deal breaker for me:

Template language... You can call it 'separation of concerns' all you want, but just let me generate templates using the language I already know, JSX is great

State management... I cut my teeth with Ember professionally for a few years, and really loved it up until I built a data intensive app. Having state spread across different controllers is great when you have many different routes and pages, but if one page turns in to a photoshop like app, controllers make a terrible state management tool. It doesn't seem overly complicated to me to use redux along with react-redux's connect function to connect regular functions returning JSX to your state object. Looking at Vue.js, it seems like I need to learn Ember-lite + Angular (custom directives).

Re: Vue.js vs. React: what happened in 2017

#77
post #26

Earlier quoted context omitted.

Can you clarify that comment? What aspects of React's development are you concerned with?

First, probably was their approach to implicitly require use of Observable objects everywhere. Second, use of arcane CS lingo and authors writing 10 pages long pages on every known MVC model, FLUX, SCHMUX and etc with weekly regularity. Third, during transition to Fiber, they went on gigantic increase of complexity by introducing a lot of what can be said to be heuristic rules, and all for non-guaranteed, minor perfo…

There is no explicit dependency on RXJS or its analogs, but the whole ecosystem is heavily tied to on them.

A question "how to do thing A when user changes thing B" on React forums is usually dismissed with "just use MobX/Rxjs/Kefir/Bacon"

Re: Vue.js vs. React: what happened in 2017

#78

I write ClojureScript A good indicator of if a technology is going to explode, is if emerging language users are excited about it, as good ideas tend to trickle down from the more advanced/research-y ecosystems which aren't as constrained by legacy. So for example React was built by a user of OCaml. ClojureScript early adopted React.js through the Om project in 2013 and there is a growing number of competing React ad…

I think it's really people's experience. I'm in your camp, I write functional javascript, I learned clojure, I think about writing software in a way where react-redux (and re-frame) fit the paradigm and get out of the way. Vue seems like Backbone v2 after drawing inspiration from Ember and Angular

Re: Vue.js vs. React: what happened in 2017

#80

I really don't get the love around vue... I always read the glowing sentiment and go, "Ok, I'm missing something, let me go back to the vue.js docs and see what's good" Things that are a deal breaker for me: Template language... You can call it 'separation of concerns' all you want, but just let me generate templates using the language I already know, JSX is great State management... I cut my teeth with Ember profess…

Are you sure you read the right docs?

> let me generate templates using the language I already know, JSX is great

https://vuejs.org/v2/guide/render-function.html#JSX

> controllers make a terrible state management tool.

I haven't used react-redux but vuex is essentially the same decoupling, and there's very little boilerplate. https://vuex.vuejs.org/en/intro.html

Post reply on HN