Live data from Hacker News

Vue.js vs. React

vuejs.org

81–90 of 486 posts

Re: Vue.js vs. React

#81
post #61
post #40

Earlier quoted context omitted.

This whole "React is complicated" is a strawman. How is JSX more complicated than any template language? How are Vue components any simpler than React components?

You can't write JSX without a template compiler (how ergonomic is it to hand write a render function?). It's painful to write React components with just a script embed (this might not be important to you , but it's important for newbies coming from jQuery), while Vue lets you get away with HTML attributes and Vue.extend(). Lastly, Vue's style scoping is superior to anything React has to offer.

Hu?

You can write JSX with just script embed.

Re: Vue.js vs. React

#82
post #65
post #56

For what it's worth, I tried Vue first and ended up moving to React and it just seems to click better with me. More/better libraries too. Nothing on the Vue side of things is as good as Material UI.

http://www.muse-ui.org/

I don't know how I missed this one, but it actually looks great. A lot of others I've looked at either has performance issues or doesn't really conform to MD very well. At least from the demo site, that doesn't appear to be an issue here.

Re: Vue.js vs. React

#83
i sense there may be a flood of react devs switching to vuejs. once their react projects are finished.

honestly react devs are missing out on how great the vue experience is. it didnt take me too long to see how much better vue is.

Re: Vue.js vs. React

#84
These are the things I find to be killer features of React and it's ecosystem:

- React Native (I know there's Weex but it's not production ready, nor as feature rich)

- Streaming server side rendering

- React Relay (GraphQL integration)

- JSX by default. VueJS pushes an Angular-esque template language where I have to learn new syntax, binding concepts, directives and conditional statements.

- Corporate backing

I've used React in very large projects, where these features have been fairly critical. React's licensing is odd but not odd enough for me to ditch it. I'd really hate to see the community churn once again on frontend libraries, but that's JavaScript for you I guess.

Re: Vue.js vs. React

#85

Earlier quoted context omitted.

This is the impression I get, but I've not got any Vue experience to back it up so it's literally just based on first impressions. I completely agree that React can feel like overkill for simple stuff, but really shines as the apps get more complex - complexity feels a lot more manageable. For example, I built this in-browser Illustrator-inspired site/app using React and couldn't have imagined doing it without (in te…

> please visit this site using some recent version of [browser that sends all your data to Google] slowclap If using a JS framework means you don't have time to test your website in more than one browser, I'll happily continue writing plain JS (or better yet, no JS).

It's just the type tester element which is not accessible with browsers other than Safari or Chrome, because there's quite a lot of CSS trickery/hacks to make it work which didn't work in Firefox.

As mentioned in my other comment, due to the target audience it was decided that it wasn't worth the investment to get it working on other browsers right now, but the rest of the site should still work.

Not React's fault, just a lack of time/budget and a lack of native browser support for advanced typography.

Re: Vue.js vs. React

#86
To me the whole idea of client-side HTML templates seems bad. They start out easy enough, but then they either limit you in power or introduce new and weird concepts to replace things that are easy, familiar and often better designed in the host language.

Here is an example on which I'd love to be proven wrong:

https://jsfiddle.net/j2sxgat2/2/

Its a generic spinner component that waits on a promise then passes off the fetched data to any other custom jsx. It can also take onFulfill and onReject handlers to run code when the promise resolves.

The concrete example shown in the fiddle renders a select list with the options received after waiting for a response from the "server". An onFulfill handler pre-selects the first option once data arrives. The observable selected item is also used from outside the spinner component.

With React+mobx and JSX its all simple functions/closures (some of them returning jsx), lexical scope and components. With Vue I'm not sure where to start - I assume I would need to register a custom component for the inner content and use slots?

Re: Vue.js vs. React

#88

What's with the hate for JSX? I think handling HTML as data makes much more sense and is much more convenient than dealing with dumb templates or weird DSLs like Vue's or Angular's.

Especially that Vue support JSX and can be used without templates.

Re: Vue.js vs. React

#89
post #49

Earlier quoted context omitted.

What is complex about the site?

I didn't think it was complex until I clicked on Jagger on the first page. It gave no indication of being editable, or I just missed the clues. Once you do click it, I'd say the complexity of the site becomes more clear. Or maybe my reference point for "complexity" is just low. Regardless, very cool site. Nice work!

Ah yes, I was referring to the type tester specifically :) Thanks, was a lot of work but a good fun project!

Re: Vue.js vs. React

#90
post #46

You'll see quotes in this thread like "The demand for both React and Vue.js is growing tremendously" thrown around. It's good to check out npm install stats to get an unopinionated comparison. https://npm-stat.com/charts.html?package=react&package=vue&p... In reality, React is downloaded roughly 4-5x more than angular and 7-8x more than Vue. In August so far, React has 75% market share among these three libs. Interes…

Here in NYC I have yet to see a job posting asking about Vue. It's all either React or maintaining an older Angular app.

usually it takes a few years for a new framework to take hold, since the react devs are probably still working on their projects and wont be switching in the middle of it. but in two years, who knows, you might be glad you picked up vue when you see almost everyone starting their project in vue come time being.
Post reply on HN