4 ms·
Those working on projects. What do you prefer? Should i choose React or Vue?
by InGodsName 8y ago
Those working on projects. What do you prefer? Should i choose React or Vue?
- Siilwyn 8y agoThis is very much personal preference. I would suggest to look at their docs & create something small for both. Plus try out their 'standard frameworks': Nuxt & Next.js.
- sametmax 8y agoTry both, and see which one you prefer. Vue first though, as it's easier to get started with it and it will get a sense of what minimal setup you should expect. Then try to match that with react. If you start by following most react tutorials, they will make you begin with something way more complicated that it needs to be and you will get discouragedd. Both have a "cli" tool. Everybody tell you to start with it. I strongly advise against it, as it's the best way to not understand a thing about what you are doing and make bad decisions. Find a tutorial that starts with the bare lib (no webpack, no transpilation, nothing but a script tag), for both vue and react. Then when you know how this work, find a minimal webpack based tutorial. Then when you know those basics, use the cli tool, but immediatly use the eject feature. Read the result to understand the whole shebang. Once you have done that, you can start any project using the cli without eject, and be confident you know what's going on. It will make you not only very productive, but also will let you take decision based on what you know, and not what other people wants you to know. Now, I personnaly prefer Vue as I find the lib easier to work with, the community saner and the documentation is one of the best I've read, even including non JS projects. But again, make an educated choice.
- parhamn 8y ago> If you start by following most react tutorials, they will make you begin with something way more complicated that it needs to be and you will get discouraged. Can't agree more with this. There are quite a few reasons I think those starter-kits and tutorials are very harmful especially to new developers. Figuring out how your tsconfig/webpack/babelrcs/state-handlers/etc all fit together should be something that should certainly be done and learned incrementally. Perhaps the issue is the amount of boilerplate you need to start a simple app. There should be a flask[1] like starter for react/vue apps. Parcel seems like the closest thing but its still not obvious to me why they demo 4 files to get started [2] -- we already dynamically transforming and compiling everything why not just have a single `index.js` with a Index/Main entrypoint? Is there anything out there to do something as simple as: import * as React from "react" import {Html, Body, Title} from "parcel" const Index = () => { return ( <Html> <Title>MySite</Title> <Body> <h1>Hello world!</h1> </Body> </Html> ) } with a `cmd {run,build} index.{jsx,tsx}` [1] https://github.com/pallets/flask/#a-simple-example https://github.com/pallets/flask/#a-simple-example [2] https://parceljs.org https://parceljs.org
- petetnt 8y agoCreate React App does pretty much with all the complexity hidden behind ’react-scripts’ you can optionally eject out of if needed sometime in the future. The steps are pretty much npx create-react-app && yarn start and finally yarn build for a production ready build.
- sametmax 8y agoUsing "Create React App" as a beginer is the best way to have no idea of what you are doing, and make terrible decisions for what follows next.
- petetnt 8y agoI'd love if you would elaborate on that so the Create React App documentation[0] and the official recommended tutorial[1] could be improved on [0]: https://facebook.github.io/create-react-app/ https://facebook.github.io/create-react-app/ [1]: https://reactjs.org/tutorial/tutorial.html https://reactjs.org/tutorial/tutorial.html edit: Saw your points above and while I do not agree I can understand your point of view.
- sametmax 8y agoI already contribute to the python community. No time for another one, sorry.
- mambodog 8y agoI would recommend just following the official React tutorial: https://reactjs.org/tutorial/tutorial.html https://reactjs.org/tutorial/tutorial.html There are many other tutorials on the web but the official one has had a lot of work put in to making it seamless and letting you get a feel for what it's like to work with React without throwing too many tangential ideas at you.
- sametmax 8y agoNo it makes you start in an online pastebin env. It's the easy way for the tutorial writter, not the easy way for the learner. I teach React regularly, I tried all methods. The only one that make people click is to make them use a flat html page and React.createElement() manually in it first. On their laptop. Offline. With no other tools than a text editor. This way, you remove the magic, and when you bring it back, people make good use of it. Magic is good for power users. It's a bad things as a beginer's tool though.
- vijaybritto 8y agoIf you are gonna work as an individual dev, then you can evaluate both. But if you're in a team, then choose whats best for the team. Both are good options that nothing serious will come against your way when working on most CRUD apps. If it involves serious computations then you should really evaluate both and select what best fits your usecase.
- sametmax 8y ago> If you are gonna work as an individual dev, then you can evaluate both. But if you're in a team, then choose whats best for the team. This is very important. Resources can often be more important than tech.
- sfifs 8y agoCreate React App and Create React Native App have both been very productive and mature tools to get things rolling fast.
- bespoken 8y agoI'd prefer React even more now with the promising Hooks. I would not easily let a random person here choose for me with all his/her opinions. It really depends on what you want to do with either library. For work/income I'd choose React as there seem to be more jobs for that. Also in the long term it feels like a pretty solid choice. React has a very big and active community, an outstanding development team, and so many codebases in the world are build on it. React will linger on for quite a while I dare to guess. IMHO it is not really a React vs Vue thing, you could also go for Ember or Angular. Just pick the one that feels and works good for you and fulfils your personal needs we cannot assess.
- nickdandakis 8y agoI've noticed that developers more accustomed to backend work, or projects that already have a heavy backend, prefer Vue. It's easier to grok because they're used to handlebar template syntax and directives. I've also noticed that Vue is preferred by people coming from jQuery and/or Wordpress type work. It's less intimidating for some unknown (to me anyway) reason. I've pushed production Vue and React projects and my personal preference is React. I haven't worked with React Hooks yet but it looks like a game-changer and would make my codebases a lot cleaner. I prefer JSX although Vue also has JSX support, but I've yet to work on a project with complete opt-in for it. React also sets you up for React-Native in some way, in case you're considering targeting native platforms as well. At the end of the day, don't pick React or Vue for a frontend that doesn't need it. For example, your personal site probably doesn't need a UI library. Then ask what your coworkers feel more comfortable with, if you have any. Finally, check how easy it'll be to integrate with (or migrate to) the existing codebase, if any. Both libraries and ecosystems are incredible at the moment. You can get a clean and reasonable codebase, performant frontend, and great pace of work with either. If you do go for the Vue route for professional work, consider donating to Evan's [patreon](https://www.patreon.com/evanyou/overview https://www.patreon.com/evanyou/overview) or [Open Collective](https://opencollective.com/vuejs https://opencollective.com/vuejs). And similarly for [Nuxt](https://opencollective.com/nuxtjs https://opencollective.com/nuxtjs). React et al have venture funding or Facebook behind them for the most part.