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/…
Switching From React To Vue.js
71–80 of 186 posts
Re: Switching From React To Vue.js
#72Earlier 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.
But that is important to note - it's not the most performance way to do it.
Re: Switching From React To Vue.js
#73Re: Switching From React To Vue.js
#74I 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.
Re: Switching From React To Vue.js
#75Things 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?
Re: Switching From React To Vue.js
#76What 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?
Re: Switching From React To Vue.js
#77Things 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…
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
#78Re: 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.
"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
#80I 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…
That might also be because once people get to Vue, they don't leave it for any "new hotness".