Live data from Hacker News

Switching From React To Vue.js

vuejsdevelopers.com

141–150 of 186 posts

Re: Switching From React To Vue.js

#141

Earlier quoted context omitted.

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 d…

> 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.

There are migration guides for v0.13.x->v1, v1->v2 and v3->v4 right in the docs of react-router. How is this a contrast?

Re: Switching From React To Vue.js

#142

Earlier quoted context omitted.

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 y…

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?

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.

Re: Switching From React To Vue.js

#143

Earlier quoted context omitted.

react-router, do you mean v1, v2, v3, or v4 (or perhaps v5 and v6, I haven't checked if there was a new release with breaking API changes during the past 12 hours).

I mean react-router is almost a 3 year old library trying to handle a rather complex problem. The first three versions were largely the same with no major changes that I can think of except for switching from context to higher order functions. I think everyone is a little dramatic about the number of versions of the library, especially when they are going to continue to support v3.

Routing is not very complex.

Re: Switching From React To Vue.js

#144
post #140

Earlier quoted context omitted.

Well, that just makes things even worse - now you have to choose which version to use, which is just proving the OPs point.

If you don't like having to choose which version of react-router to choose, you probably should be using a preset like create-react-app which makes this kind of decision for you. Or you should use something other than React which includes everything and the kitchen sink.

Exactly! (snark aside)

Re: Switching From React To Vue.js

#145
I have no doubt VueJS will be the most popular framework in a couple of years, right now the adoption rate is not as fast as it could be because people have already invested in React/Angular so switching so soon looks like a downside, but people just getting started and that have zero investment in any of the 3 frameworks will go for VueJS without a doubt, because is much more easy to learn and equally or even more powerful.

That was my case, I spent several years sticking to jQuery and waiting for the wave of "a new JS framework out every x months" was over, and after researching which framework to learn, VueJS was a clear winner.

The syntax is way more simple and elegant, and as soon as Weex is stable it will be able to power mobile apps too!

Re: Switching From React To Vue.js

#146
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.

Thanks. I mean "v-" etc in HTML, which is like "ng-" in NG1.

Re: Switching From React To Vue.js

#147

Earlier quoted context omitted.

I mean react-router is almost a 3 year old library trying to handle a rather complex problem. The first three versions were largely the same with no major changes that I can think of except for switching from context to higher order functions. I think everyone is a little dramatic about the number of versions of the library, especially when they are going to continue to support v3.

Well, that just makes things even worse - now you have to choose which version to use, which is just proving the OPs point.

This doesn't really make sense to me. You have to pick a version for literally every single library you use. And those different versions have different interfaces, which is why they have different versions...

Re: Switching From React To Vue.js

#148
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…

Three20 was made obsolete by the useful parts of it getting built into the platform SDK, and yet it was still maintained and kept in a working state for longer than it was ever actually useful.

Re: Switching From React To Vue.js

#149
post #25

Earlier quoted context omitted.

Is it because of the technology or because of the team? Rhetorical question - I am by no means attacking you or your team, I just clicked on your "is messy with JSX, router" sentence and decided to put my reply under yours. I see many people tackling React but not developing in a 'React' way. For example I recently saw on HN some user complaining that he had to create N functions to handle N items on a form, while co…

router and redux make it messy (or rather lack of standard of routing and global state management in react makes every one create their own half assed implementations)... also transitioning web developers from writing giant HTML pages to thinking about smaller components is a difficult, without dedicated react designer. All these make non trivial react apps a graveyard of crappy jsx and messy untyped tangles of JavaS…

> also transitioning web developers from writing giant HTML pages to thinking about smaller components is a difficult, without dedicated react designer.

Can you elaborate? I naturally gravitate towards separating code into components in a framework-agnostic sense - React was very intuitive to me and devs I've talked to seem to feel the same way. Writing huge atomic pieces of HTML is nothing but a huge headache; it's awful to maintain as it results in copious amounts of redundancy / tech debt.

Re: Switching From React To Vue.js

#150
post #117

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 wo…

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.

Look up nuxt.js. It is like react starter kit for Vue, comes with SSR and webpack configured, etc.
Post reply on HN