[Edit: should have clarified, but I'm a solo entrepreneur. But eventually plan to hire others to mainly take over the dev work.]
I have some past experience with Vue (specifically Vue 2), but it's been a while and I've forgotten most of it. Considering Vue 3 is out and quite different, it feels almost like starting from scratch.
My initial choice of Vue was based on its ease of use for beginners, as recommended by a friend. I found it approachable, but now I'm reconsidering my options.
Here's why I'm contemplating React:
- It seems to have a much wider usage in the industry.
- There's a larger ecosystem of tools and resources available for React.
- It might be easier to find and hire people skilled in it.
- I've noticed specific tools and resources, like the low-code tool Recode and Tailwind UI templates, predominantly use React.
Given these points, I'm leaning towards React despite my prior experience with Vue. I'm looking for insights from the HN community. Which framework would you recommend for someone in my position? Any advice or personal experiences would be greatly appreciated.
For Vue, I think it's in the middle for me, it can be used by teams and can be used by solo devs and it seems to follow some very good practices. This I would take away from React only for the reason that each major version introduces some new concept that flips things on its head and I have feel like each new react project doesn't feel like an older one I worked on 2-3 years ago, and in some cases, not for the better.
Regarding Svelte, I wish I used it more. I built a project [1] that took me almost no time except fiddling around with github actions to get it up and running and it felt so naturally close to html/js when building, I was hardly looking up documentation or tutorials. Adding new features to it felt even more fun.
I've mainly stuck with React because of the large ecosystem but in 2024, it feels like once you find a good starting point with any of these, you should be able to build most apps with it.
Another thing to not shy away from is seeing that most large projects use React as an example, you can use something like ChatGPT to convert a react snippet to a vue or svelte snippet.
If you're building a startup go with Vue if it allows you to get up and running faster. Use React if it gives your project a distinct advantage because of a library you can access that gives you a specific advantage over your competition and gets you to market quicker.
For the record I am a Vue/Nuxt developer but in my case its because I am a solo entrepreneur and I find it easier to just get stuff done.
Vue's docs are excellent, and I used GPT-4/Phind/Copilot (I wanted to try different solutions) when I got confused. I chose not to rewrite stuff to use the new Composition API (which is apparently analogous to React hooks) for now. I did change the build system to Vite, which is awesome, and which you can also use with React.
I don't have anything against React, except that it seems very complex and is missing basic (to Vue) functionality, the most notable being Single-File Components (which I'd miss terribly). https://vuejs.org/guide/scaling-up/sfc.html
p.s. You'll be surprised how far you can get building a website with vanilla Javascript without the use of any advanced framework.
Vue is entirely "class based" and matches more closely with an object oriented style. It is heavily based on the mobX (previously knockout.js) approach to reactive properties on objects.
React, at least the more recent iterations, works best using function components with hooks and adheres to more of a functional programming paradigm (though you can still use class based components, these are no longer what the react team recommend).
After many years of playing with both React and Vue, I personally much prefer a functional approach and prefer React. The "top down" data flow is much more predictable and easier to debug than having derived properties that are dependent on other derived properties that are dependent on other derived properties (etc... you get the idea).
Vue was great until the v3 rewrite where they tried to copy react hooks.
The problem with React - and to a lesser extent Vue - is that each project will likely use different libraries for similar functionality. There are some very popular defaults for many (like routers), but you'll still end up needing to be familiar with more than one.
You could look at Next.js which is a React-based framework.
Between Vue and React, I'd go with Vue. It has the same problems with multiple options for every framework aspect, but most of it is Vue-branded (so to speak) which means you're less likely to need to learn alternatives. I also think it makes more conceptual sense than React, but that's a personal opinion.
If your interest is to become employed, React is definitely more popular - but it's not better.
Vue suffers less from this issue, as you'll well know, and Svelte doesn't suffer at all.
The same can be said for people being skilled in it. It takes longer to skill up on React, less on Vue, and the least on Svelte.
A lot of people end up using React because of these invented scenarios, when in reality, building something rapidly like a start-up is significantly quicker with Svelte. Trust me, I've done it, and we're post Series A, and now reaching profitability.
React and Vue are both quality "expert" level tools, so you should choose based on other criteria. If you really need a job go with react (there are 4x more react jobs than vue jobs on indeed in my area). If vue really clicks with your style of thinking maybe go with vue.
Finally just pick one and get started. They really aren't that different, and if you are in the industry long enough you'll learn many languages and frameworks. Also I would be surprised if React or Vue stay popular much longer - though there will always be work on legacy apps (hello cobol, php, spring, .net, rails, ....) Also the more experience you have the faster you can learn new things. It doesn't matter much which is you first - you aren't getting married!
As for personal experience, I've used both lightly. For each, after a few hours of going through the docs/tutorials I was productive enough to get work done in a production application. Often my code was better than the "experienced" front end devs because I have 20+ years of generalist experience, and I actually read the docs (you would be surprised how many full time react/vue devs have never read the documentation - just learned bits and pieces on youtube, etc).
They are both pretty simple. The complexity mostly comes from the users of the frameworks adding unnecessary complexity to their own applications due to bad architecture, not fully understanding the frameworks (didn't RTFM), and trying to push the frameworks beyond their sweet spots.
I picked up react due to similar reasons as you stated and I am happy with my decision so far. Was able to build quite a complex web app as solo developer with React and Vite.
However there are some quirks about it, due to it being an older frameworks and many parts of it are not intuitive.
This is mitigated by fact that many good resources are available.
However if I was to start new project I would choose svelte as i like how it is more intuitive to use. But I would not pick up this as my first framework, hence chose React so that I can get comfortable with frontend development.
One advise though whatever frameworks you choose, start with typescript it will make your development so much better
Talk: https://youtube.com/watch?v=dpw9EHDh2bM&si=6TyFab5RYKV1RwEY
By the end of the talk you'll probably be leaning towards "this sounds cool, I'd like to play around with it" or "that sounds like cursed incantations for the damned".
Yes, that is no longer true. It is as complicated as it gets. Moreover, they killed a whole ecosystem while making the transition from 2 to 3. Go with React, I regret not doing that myself.
Check out some alternative non-SPA style frameworks like htmx, or Hotwire. You could save yourself a lot of work if these tools are sufficient for your app’s needs.
Job-wise React is probably the better option, in terms of number of job offers you might get.
Vue’s smaller ecosystem has not proven to be difficult in practice. I think we could benefit form importing less dependencies in our projects anyway :)
React seems hard to use, ever-changing and generally not a good option on a technical level. I haven’t used it professionally but that’s the impression it’s given me
For me, if I were trying to get hired, I would choose React. If I were looking for my own side project or in a position where I got to choose, I would choose Vue.
I had this argument with people a few times, and I always used to say "I could imagine writing a rudimentary version of React myself, without seeing their source code. I couldn't imagine that for Vue".
One day I decided to put my money where my mouth is, and did it. Only about 400 lines of code with all the main hooks. I'd share it here, but more to the point I'd encourage others to try it themselves instead - the code isn't the point.
Probably React. But real world code (in the form of libraries/apps/projects) is way more valuable IMO. Regardless of framework, to an extent of course. Good luck!
If it's the former: React
If it's the latter: Svelte (Especially with Svelte 5 around the corner)
Neither is exclusive of the other. I'd start with React, since it's 80% of the market. But, once you feel comfortable with that, move on to learning Vue.
Also, it's worth it to consider looking at Svelte. If anything is going to take a chunk out of React's market share in the future, it will be Svelte or something that looks like it.
Remember that there's no limit to what you can learn, one step at a time.
If this is for your own projects, especially since you have some past experience with Vue 2, stick to Vue. It's simpler, the documentation is excellent, the community is great, and I found it to be more stable, fun and productive than React.
If the intent is to find a job, learn React. Even though if you have experience with a framework, you can easily pick up another one later.
But I honestly don't think it's that important.
Isn't it obvious?
In my view they both can suck and shine depending on the application.
I don't get the point of learning something you don't enjoy working with.
Both are good, both are widely used.
So learn React.