Live data from Hacker News

Switching From React To Vue.js

vuejsdevelopers.com

101–110 of 186 posts

Re: Switching From React To Vue.js

#101
post #89

The far biggest problem with Vue for me is the template language. Once you've used JSX you just don't go back to Angular style templates.

I'd say that this is a matter of personal taste. After having worked extensively with both, I still can't get used the JSX-way of doing interpolation or conditionals and find the infamous Angular style template easier to reason about and work with.

Having said that, you might be interested to know that there's an official Babel plugin that lets you write your Vue templates with JSX: https://github.com/vuejs/babel-plugin-transform-vue-jsx

Re: Switching From React To Vue.js

#102
post #89

The far biggest problem with Vue for me is the template language. Once you've used JSX you just don't go back to Angular style templates.

A couple notes: (1) You can use JSX with Vue. https://vuejs.org/v2/guide/render-function.html#JSX (2) By "Angular style templates" do you mean Vue's Single File Components? Because from my POV they're glorious, and the primary reason I'd be reluctant to use React instead of Vue.

Re #1: for both React and Vue, if you don't stick to the most common and standard methods for implementing functionality, you're going to cause yourself a lot of unnecessary pain. Everything around those ecosystems (documentation, debugging tools, libraries, etc) is designed for streamlining development for people who don't stray from the mainstream.

Re: Switching From React To Vue.js

#103

Earlier quoted context omitted.

Actually the opposite for me, and the original reason I went with Vue (tho after using it more I like a lot about it). I just do not get the appeal of JSX. Directives are meh, but I still prefer it to JSX.

Do you think that your preference is just from your previous experience? JSX feels like uninhibited templating to me, which is great when it is done right (and a little crazy when done poorly). I also feel like it gives cleaner error messages.

Vue (+ ESLint) give pretty clear errors when you've messed up that make it quick to fix.

But yea, I mean I think it's subjective for most people. I'm not sure there's any real reason to go one or the other outside of developer happiness (could be wrong, though). A big part of Vue is to have a low learning curve and be less opinionated. So it feels more like enhancing your workflow (either in existing apps or new ones) than adopting a whole new way of doing things. I'm just personally more into that.

Also, for what it's worth, you can use JSX with Vue. The only downside I can think of is any time you have a problem it might be hard to find solutions since most people stick to directives. If you already know JSX, though, that might not be an issue.

Re: Switching From React To Vue.js

#104
post #68
post #35

Things you're sacrificing when going away from React: 1. Stability. FB uses it for their main product, which is probably the biggest web app of them all, they pay many devs to work fulltime on it. People coming from Angular, who had to migrate all those breaking changes over the years know the struggle. 2. Options like React-Native, React-VR and co. React enables your devs to acquire a whole new range of possibilitie…

Options like React-Native When you use React for a web app, how close are you to turn it into a React Native app?

If you stick to using `react-native-web` components to design your web UI then your app is likely compatible with React Native and can be run as a mobile app in addition to deployed as a web site.

Re: Switching From React To Vue.js

#105
post #68
post #35

Things you're sacrificing when going away from React: 1. Stability. FB uses it for their main product, which is probably the biggest web app of them all, they pay many devs to work fulltime on it. People coming from Angular, who had to migrate all those breaking changes over the years know the struggle. 2. Options like React-Native, React-VR and co. React enables your devs to acquire a whole new range of possibilitie…

Options like React-Native When you use React for a web app, how close are you to turn it into a React Native app?

[deleted]

Re: Switching From React To Vue.js

#106

Earlier quoted context omitted.

https://vuejs.org/v2/guide/routing.html For most Single Page Applications, it’s recommended to use the officially-supported vue-router library. For more details, see vue-router’s documentation. https://github.com/vuejs/vue-router -- https://vuejs.org/v2/guide/state-management.html Vue offers vuex: our own Elm-inspired state management library. https://github.com/vuejs/vuex -- Out of the box or not, they're part of th…

Redux has been from the same github org for a very long time too: https://github.com/reactjs/redux And react-router, while not being on the same github, is pretty much considered a standard too. It's ok to not split hairs for vue.js, but then you shouldn't do the same for react...

react-router is one of the worst evolved software proects I've seen which keeps destroying it's knowledge base with every release with almost everything indexable on the web out of date with the latest version. It's also not as intuitive to use as vue-router (which just worked OOB) and it's root page handling behaves differently to the Routers in Angular, Aurelia and Vue.

It feels like you're incurring tech debt by depending on React Router but unfortunately since it's the defacto standard there's very few other viable options.

By contrast Vue feels like they care about their ecosystem and existing Customer code bases and will publish nice migration guides when they make breaking changes showing how old functionality can be migrated to their new APIs.

Re: Switching From React To Vue.js

#107
post #35

Things you're sacrificing when going away from React: 1. Stability. FB uses it for their main product, which is probably the biggest web app of them all, they pay many devs to work fulltime on it. People coming from Angular, who had to migrate all those breaking changes over the years know the struggle. 2. Options like React-Native, React-VR and co. React enables your devs to acquire a whole new range of possibilitie…

I don't consider the fact that a large company uses something for their main product is enough to actually make it future-proof. Previous instances of that pattern: - three20 (used in FB ios app https://en.wikipedia.org/wiki/Three20 ) - GWT - Angular is actually a similar instance of that problem, to some extent If "large company" switches their goal at some point, then you're still alone. Currently I'm kind of more…

Absolutely. Look at google for instance and all the things they've stopped supporting.

I find the argument also quite disturbing because this will add to the already existing monopolies of these "large companies".

Re: Switching From React To Vue.js

#109

I stopped reading at "both are fast and light weight" because I don't find react to be "light weight". React is 275K (nearly a quarter of a meg) when it is minified and gzipped. 750K when it is not minified/gziped. We're talking about a web page UI here. It should be tiny for users with slow connections. React seems big to me and I can't justify it except in very large applications. As such, I struggle to find the re…

> As such, I struggle to find the reason React is so popular.

Uhm, React websites run great in Chrome on a MacBook Pro. You seem to think that most web developers care about users on slow connections.

Re: Switching From React To Vue.js

#110

I stopped reading at "both are fast and light weight" because I don't find react to be "light weight". React is 275K (nearly a quarter of a meg) when it is minified and gzipped. 750K when it is not minified/gziped. We're talking about a web page UI here. It should be tiny for users with slow connections. React seems big to me and I can't justify it except in very large applications. As such, I struggle to find the re…

While I agree that React (with ReactDOM) is heavier than it probably should be, a production build is around 140k minified, 45k min+gzipped.

I personally find React applications to be fairly easy to navigate compared to other JS projects, but my use of it has primarily been porting applications from Angular, Knockout or Asp.net Webforms to React.. and I find it a lot easier to work with than those personally. Haven't tried Vue though.

Post reply on HN