Live data from Hacker News

Switching From React To Vue.js

vuejsdevelopers.com

161–170 of 186 posts

Re: Switching From React To Vue.js

#161
post #117

Earlier quoted context omitted.

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.

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

#162

Earlier quoted context omitted.

> unlike React provides a lot of functionality out of the box. Stuff like the router, the computed properties, automatic change detection, I never studied Vue, but the article starts saying "Both have separate, but commonly used, router and state management libraries". This doesn't look like "out of the box" to me.

https://vuejs.org/v2/guide/routing.html For most Single Page Applications, it’s recommended to use the officially-supported vue-router library. For more details, see vue-router’s documentation. https://github.com/vuejs/vue-router -- https://vuejs.org/v2/guide/state-management.html Vue offers vuex: our own Elm-inspired state management library. https://github.com/vuejs/vuex -- Out of the box or not, they're part of th…

The official Vue docs? The ones where half of the useful stuff is either missing, incomplete, or doesn't work because it's information for a deprecated version?

Vue has a lot of things going for it. Documentation is not one of them.

Re: Switching From React To Vue.js

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

Just because Facebook is big and supports something isn't necessarily a good thing. Their goals, resources and accepted trade-offs aren't likely the same as your own. For a large company like Facebook, handling large changes to a library aren't a concern because they have essentially limitless development resources. For small operations like mine (and maybe yours) these breaking changes can reduce the time you spend…

Just because Facebook is big and supports something isn't necessarily a good thing

Not in hobbyspace. But in Deliver-a-Product World, it matters a lot.

Re: Switching From React To Vue.js

#164
post #100

Earlier quoted context omitted.

If we move away from only spa appications vue has other use cases. For a Rails / PHP site that only needs small amount of javascript vue feels like a natural choice to replace some of the existing jquery

Isn't the same true of React however?

no, React will replace your Rails routers.

Re: Switching From React To Vue.js

#165

Earlier quoted context omitted.

Isn't the same true of React however?

no, React will replace your Rails routers.

That's not strictly true: vanilla React doesn't even use a router until you wire one up. It's perfectly cromulent to use just few bits of React on an existing web app/site.

Re: Switching From React To Vue.js

#166
post #75
post #68

Earlier quoted context omitted.

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.

This really isn't the case. I have built apps with lots of code reuse on native and web.

Abstract all data logic and you can use the exact same code for both apps. This of course does not include your view layer. If you do it correctly, all you have to do is make a new set of view components. Stateless ones. Because you are injecting the state from your non platform specific components.

It makes it extremely fast to build for other platforms. It just takes a few apps to fully understand how to abstract these things perfectly.

Re: Switching From React To Vue.js

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

It's less about code reuse across a full featured web application and a mobile application. The value comes in that once you master React or React Native, you can easily switch across platforms and be just as efficient. If you learn the ins and outs of Vue and gain depth of best practices / domain knowledge, you are stuck building only for the web.

If you do the same with React, you are then able to take those skills and build VR, Web, iOS, Android, Windows, and soon TVOS ++ many more in the future.

This, along with what has already been stated, is the value of using React vs Vue imo.

Re: Switching From React To Vue.js

#168
post #42

Working with React for almost 3 years now. Came from Angular, Bootstrap, jQuery, etc.. Done small and very large projects with it. It scales better than anything I've used before. It's amazingly reliable and robust. Looking 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…

They switch because it lets you do things the old, incorrect way.

Like using jquery. People want what they don't have to spend time learning. They're used to templates with handlebars. Used to mutating variables. That's why I think so many jquery people and those touting "you don't need jsx or babel" use it.

Because it lets you be lazy and do things they way you're used to instead of better practices that have been found.

It's funny when I hear people act like its way too difficult to setup babel. I'm sorry, but if you're using any ES6 stuff (who doesn't use arrow functions) and you need to support older browsers (a real production app would). Then you're going to need babel and include some polyfills. Go ahead and use vue without all this "horrible babel pipeline" and don't use any language features that have been added in the past three years if that's really what you want.

Re: Switching From React To Vue.js

#169
post #104
post #68

Earlier quoted context omitted.

Options like React-Native When you use React for a web app, how close are you to turn it into a React Native app?

If you stick to using `react-native-web` components to design your web UI then your app is likely compatible with React Native and can be run as a mobile app in addition to deployed as a web site.

Do you remember when the first iPhone was released and one of its main marketing points was that it could browse the REAL web? ... Nowadays we are crippling the real web (or at least it's design) so we can have a version for small screens. Oh the irony :(

Re: Switching From React To Vue.js

#170
post #42

Working with React for almost 3 years now. Came from Angular, Bootstrap, jQuery, etc.. Done small and very large projects with it. It scales better than anything I've used before. It's amazingly reliable and robust. Looking 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…

Vue has electrolytes and it is gluten free. Seriously though I think Vue is the latest shiny example of everything that is wrong with the javascript community. Javascripts huge problem is the lack of a standard library or better yet a standard way of doing anything. To fill that void alone came NPM. With a million tiny fragmented micro libraries. Then it became a common to start reinventing the wheel and selling your…

The problem is that people assume that old = bad. As soon as one technology is starting to have a nice big community and enough ressources to be usable, the hype for something new destroys it.

People could use Angular 2 Years ago just fine, what on earth happened that it suddenly became so terrible?

Also those are just frontend frameworks! Why is everyone glorifying those??? Is Backend an after thought nowadays? "We got nodeJS... The frontend guy know JS. He will code something, don't worry."

Post reply on HN