News for hackers. Stuff that matters.
Re:Switching From React To Vue.js by jaequery on Sunday May 28, 2017 @12:08PM (#14434891)
There is a bit of React kool-aid in here, makes me really wonder if any of them have actually tried using Vue because the benefits and improvements you will see with Vue are immediately noticed.

To be frank, the OP actually did a poor job of presenting Vue here because it only mentioned the similarities, which doesn't do any good for Vue. It did not get into areas where Vue is better than React, which is what most would be interested in hearing.

If you ever put React and Vue.js side by side and compare, it is almost a no brainer to switch. How it handles bindings, the way they got Redux done right, and the single file component style, are all improvements over React IMO. I'd jokingly say if React were to keep improving and evolving for the next couple years, it may possibly look like Vue.js as of today.

Re:Switching From React To Vue.js by speg on Sunday May 28, 2017 @12:12PM (#14434905)
Interesting. I hadn't touched React in months and recently spent a week with Vue. I had trouble getting up and running and was soon longing for React, or at least what I remembered of it.
Re:Switching From React To Vue.js by jaequery on Sunday May 28, 2017 @02:31PM (#14435498)
Look up nuxt.js. It is like react starter kit for Vue, comes with SSR and webpack configured, etc.
Re:Switching From React To Vue.js by Etheryte on Sunday May 28, 2017 @06:21PM (#14436341)
While Vue is awesome, Nuxt is quite horrible. Nuxt's developers have made some very weird design choices that you can't opt out of if you want to use it. For example, you have to define your routes by defining a directory structure[1], which means you have nonsense tree structures, no aliasing, etc. While they've provided an easy to start SSR solution, the rest of it is simply bad.

[1] https://nuxtjs.org/guide/routing/

Re:Switching From React To Vue.js by hashkb on Sunday May 28, 2017 @12:12PM (#14434906)
I'd love to see you elaborate. Your post is just Vue Kool aid.
Re:Switching From React To Vue.js by sametmax on Sunday May 28, 2017 @12:22PM (#14434972)
Well, first, vue.js doesn't force you to use components. So you can just throw your data into the HTML page and see what happens. It's a huge win in the early phase of the project, as most of the time your page will change so much you will not see any reusable components before months. It's a real time saver, and let you refactor only the important parts in components later.

Secondly, you are not tied to JSX. While you can use JSX with Vue, it comes with a very simple and clean templating language that is much more natural to manipulate than mixing JS and a fake HTML.

What's more, you don't need webpack, not even babel to use Vue. You can actually drop the 30ko (gzip + minified) of the lib and create a decent projet as-is. Of course you can later setup a whole pipeline, with even server side rendering if you wish. But for a start, you can just use it as easily has you used to with jquery. Which means people comming to the project will be easy to train to: it takes one afternoon to comprehend react hello world. It's the time to understand the whole Vue lib.

Eventually the community is great : the doc is well written, the tooling is full of small details (such as .once.prevent or the dict classes) that makes your life easier and the API surface is kept small. Most third party tools adopt the same philosophy: pragmatic, useful, scale down then up.

Honestly after so much react, I'm happy I found Vue. It's just better. Doing training for both, I can also tell you that training for Vue is 2 orders of magnitude easier than react.

Vue is what react should have been really. But let's not blame react. The react dev created shoulders for the vue devs to stand one.

Re:Switching From React To Vue.js by chrislgrigg on Sunday May 28, 2017 @12:43PM (#14435091)
To help put this in perspective, how heavily did you use React before switching to Vue? How did you feel about it at the time, before you were aware of Vue?
Re:Switching From React To Vue.js by sametmax on Sunday May 28, 2017 @01:50PM (#14435358)
I used react for one year, for the web, but not react native. I'll be honest: once I got fluent in react, I still didn't enjoy it.

Too much scrolling around, looking up the doc for every simple things, hard to integrate with legacy Python/Ruby/PHP frameworks, etc.

I went from jQuery then Angular 1, and was much less productive in React.

Also, introducing react to a new member in the team has always been dreadful.

All in all, I never benefited from the concurrency part. The performance yes, and the structure for the SPA. But the whole immutable constraint didn't pay off for me in the end, so I felt my stack was overkill.