Live data from Hacker News

Switching From React To Vue.js

vuejsdevelopers.com

71–80 of 186 posts

Re: Switching From React To Vue.js

#71

Vue and React both seem a little too heavy in boilerplate. It's also interesting that Vue seems to think that mutable state is a good thing (well, vanilla React does have mutable state too...). For the boilerplate (and large bundle size!) problem we have http://markojs.com that looks very interesting. However, I think what we really might want is something closer to ClojureScript's re-frame ( https://github.com/Day8/…

marko looks good

Re: Switching From React To Vue.js

#72
post #41

Earlier quoted context omitted.

> The major problem I did not see it as a problem. I appreciated the light weight approach being shown first. In fact, for my use case, I prefer not to bring in the ecosystem. That could change, and the article introduces the heavier approach. > the way that you're actually supposed to do things The one message that comes out of the Vue camp and happy users is that Vue can fit many project types - small to large. Not…

That approach is actually heavier - the template compiler needs to be distributed (extra 15kb gzipped) and templates need to be rendered at runtime.

I think they meant "lighter integration" - you need less tooling to get going. Bad for performance, but good for dipping your toes in.

But that is important to note - it's not the most performance way to do it.

Re: Switching From React To Vue.js

#74
post #51
post #44

I don't get it. Lets say that you have a well formed team, then you have a designer. A designer is who does the UI but know or care so little about programming. With React, the UI is practically JSX that very few people know (in comparison with html) and what we will get instead?, the result is the same html that it tries to avoid.

Not sure what your concern is, JSX is extremely simple to pick up with a cursory knowledge of HTML and Javascript.

I actually was thinking it was a non-issue until I saw a designer actually struggle with working with JSX for doing some animation (I had to help him out), and the designer had some knowledge of JS.

Re: Switching From React To Vue.js

#75
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?

the hearsay is that if you used only components that are available for both, it'd take very little extra boiler plate to get it working on both native and web. But all non-trivial apps have their own components and that's what makes native difficult.

Re: Switching From React To Vue.js

#76
post #6

What are good examples of popular websites (not behind a login) that make use of Vue or React? I ask because I keep reading about it, all programmers seem to use it, but I just don't come across websites that use it. Is it only used for backend dashboards? Or do all Vue/React sites fail to gain traction for some reason?

Gitlab uses Vue: https://about.gitlab.com/2017/02/06/vue-big-plan/

Re: Switching From React To Vue.js

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

GWT was first released 11 years ago, the most recent update was less than a month ago. If that's not an example of future-proof (for web technologies) I don't know what is.

Whether it's kept up with the state of the art I don't know, but I think that's a different thing.

Re: Switching From React To Vue.js

#79

> ... If message is passed as a prop to any child components, Vue knows that they depend on this will be automatically re-rendered as well. That’s why there’s no need for a shouldComponentUpdate method on Vue components. I think that React does the same? If a component's props and state don't change, shouldComponentUpdate doesn't get called at all IIRC. shouldComponentUpdate, instead, is useful when a state or prop w…

There's a default shouldComponentUpdate implementation in the React.Component. It does a shallow compare of state and props. When you define shouldComponentUpdate you are just overriding that implementation. So it's always called, its just you don't need to always define it.

From the React website:

"When a component's props or state change, React decides whether an actual DOM update is necessary by comparing the newly returned element with the previously rendered one."

My point is that if a component doesn't receive a setState or new props it just doesn't start the rendering cycle at all (AFAIK), so shouldComponentUpdate doesn't get called at all.

Re: Switching From React To Vue.js

#80

I have built applications using React and most recently Vue2. Both are very very similar and if you are familiar with one you will be able to pick up the other quite easily. In regards to webpages both are capable of doing the same things and fit the same uses cases. That said however if I was to start a greenfield application today, I would choose React. The reason for this is that react is better known, it is easie…

>In a year or two I predict that I will see another article with a title along the lines of "Switching From React To ". It is very unlikely in my opinion that I will see a "Switching From Vue To " article.

That might also be because once people get to Vue, they don't leave it for any "new hotness".

Post reply on HN