The major problem with this tutorial is that it doesn't cover single file components ( https://vuejs.org/v2/guide/single-file-components.html ) at all, which are superior to (and preferred to) implementing string based render functions (which rely on a runtime template compiler). Indeed, the Vue NPM package doesn't even provide the runtime template compiler by default. Stuff like what the article promotes are great f…
> 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…
Switching From React To Vue.js
41–50 of 186 posts
Re: Switching From React To Vue.js
#42Looking at Vue I cannot think of 1 single benefit I gain by switching. It doesn't even come close to what React is capable of imao. I really have no clue why people are pushing this at all.. Are there any examples of large projects that switched from React to Vue without suffering a loss?
Re: Switching From React To Vue.js
#43Earlier quoted context omitted.
Interesting. The ones not behind a login (Twitter,AirBnB,Reddit Mobile) are sites that feel laggy and clunky to me. With slow loading content, loading animations, laggy scrolling, too much stuff opening in new tabs, confusing interfaces. I wonder if React causes/incentivises this or if it's design decisions by the coders/designers/managers. In contrast, pages like Reddit Desktop, Google and Amazon work much better fo…
Actually the new Twitter Mobile called Twitter Lite is super fast, did you try the latest version? It's a full progressive web app that works offline, has notifications and super fast scrolling. It was designed to work on low end Android device, give it a try: https://mobile.twitter.com
Re: Switching From React To Vue.js
#44Re: Switching From React To Vue.js
#45Earlier quoted context omitted.
Mobile Twitter uses React. https://mobile.twitter.com/facebook Airbnb uses React https://www.airbnb.com.au/rooms/432044 Facebook, Facebook Messenger, Instagram, Netflix, Reddit Mobile, new Reddit Profile pages are all high profile sites using React that aren't just 'backend dashboards'.
Interesting. The ones not behind a login (Twitter,AirBnB,Reddit Mobile) are sites that feel laggy and clunky to me. With slow loading content, loading animations, laggy scrolling, too much stuff opening in new tabs, confusing interfaces. I wonder if React causes/incentivises this or if it's design decisions by the coders/designers/managers. In contrast, pages like Reddit Desktop, Google and Amazon work much better fo…
For the rest: opening in tabs is obviously a design choice. So are "confusing interfaces"–whatever that may mean, because if those reddit and twitter mobile sites are confusing you, good luck with amazon. React build a DOM. You can make a table-based layout with a spinning e-mail icon if that's what you want.
As for load times: mobile.reddit.com comes in at just under 1MB, but that's compressed to 400kb which is basically irrelevant once you expand the first image posts. JS is just about 200kb compressed.
And once it's loaded, only the JSON-encoded data goes over the wire: on the first click anywhere, the data transfer is amortised because the hundreds of don't have to be transferred.
Re: Switching From React To Vue.js
#46Our company migrated to vue.js, 4 months ago. Our complex app is messy with JSX, router, and new dev can't keep up with code. Now we start every new app with Vue.js. The gap between junior dev and senior dev comes closer. They can collaborate with less bugs, less problems and less time to develop.
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…
Re: Switching From React To Vue.js
#47Both 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 easier to find solutions for, and it has more mature guidelines for things like project structure and best practices.
Vue is good competition for React and it will certainly help keep it on it's toes. However in regards to longevity, I feel React will be around a lot longer than Vue. React has the full support of facebook and is being used by other major vendors. Vue is also used by some big sites, however it has no official backing that I know of and is maintained by a "Benevolent dictator for life".
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.
Re: Switching From React To Vue.js
#48> ... 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.
Re: Switching From React To Vue.js
#49> ... 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.
Re: Switching From React To Vue.js
#50Earlier quoted context omitted.
Actually the new Twitter Mobile called Twitter Lite is super fast, did you try the latest version? It's a full progressive web app that works offline, has notifications and super fast scrolling. It was designed to work on low end Android device, give it a try: https://mobile.twitter.com
At first it gives me a white page with a little blue twitter logo. Then the twitter logo disappears and I see a white page for a second. Then it gives me a strange blue page with a giant twitter logo and two buttons glued to the bottom that tell me to log in.