TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: React, Vue or Angular?

16 点作者 BeeFriedman11 个月前
Which one would you recommend and why?

24 条评论

montroser11 个月前
If you care most about ecosystem, then React.<p>But really, if you just want to get things done without arguing about the twenty different ways it _could_ work, then Vue.<p>React and ecosystem are overflowing with conflicting paradigms and mismatched libraries and frameworks for your frameworks that all make it very messy. In code, and with humans too, it all becomes difficult to navigate.<p>With Vue, you just do it the Vue way and it all just works. Then you get to focus on more important things like how to craft the product.
评论 #40730901 未加载
评论 #40732927 未加载
GavinAnderegg11 个月前
Of this list, I&#x27;d choose React. It&#x27;s the most supported, has a lot of well-maintained components, and I&#x27;ve found it the easiest to hire for.<p>If you&#x27;re interested in another option, I really recommend looking into Solid.js. It&#x27;s not as mature or component-rich, but it does a great job of solving some issues with React. The biggest benefit to me is the &quot;signals&quot; system. It allows you to use state between components without having to use a Redux pattern or pass layer after layer of props. I also love that it&#x27;s compiled, which keeps the end product small and quick, but also can help find some issues before runtime.
评论 #40731401 未加载
speedgoose11 个月前
I have made projects in Angular 1, Vue, React, and Svelte. I would start a new project using React because it’s the most popular, it has the most well maintained libraries, LLMs know it better, and the other frameworks aren&#x27;t much different.<p>Svelte is nice but I like react&#x2F;mobx more.
评论 #40739410 未加载
评论 #40730845 未加载
评论 #40730432 未加载
apitman11 个月前
Vanilla Web Components (probably with Lit.dev). They&#x27;ve come a long way in the past decade, and if you decide to go full framework later you can bring your components with you.
评论 #40731001 未加载
barnabee11 个月前
Svelte. It&#x27;s the only front end framework that &quot;clicks&quot; with me and I find I can build MVP&#x2F;prototypes and simple apps much faster than in other frameworks.
评论 #40730441 未加载
theonlyjesus11 个月前
Angular is the way to go! Larger projects that multiple people maintain should use opinionated, well-structured JS frameworks.
评论 #40731376 未加载
maremmano11 个月前
Svelte? HTMX? a lot depends on the type of application you intend to develop.
rvense11 个月前
I can&#x27;t comment on the benefits at scale that another poster cites, but I&#x27;ve been working on an Angular project in a small team for four years now. This was quite close to a greenfield project, only a very small amount of code had been written, but we decided to keep it and stick to Angular even though two out of three of us had more experience with React. I had done both React and AngularJS and went in thinking that there wasn&#x27;t much of a difference between frameworks.<p>I would not pick Angular again for a new project under any circumstances.<p>We have had many problems with the build system (e.g., an update suddenly bumped build times to several minutes due to some configuration option), the build process is ridiculously heavy, our laptops with 16GB RAM struggle with it often.<p>And we have had countless bugs related to component initialization and statefulness that I am certain would not exist in React. Our code is littered with early returns and ?.s that exist only because things are undefined for a split second before all the state comes in. We use a lot of RxJs, but it&#x27;s quite often like coding in two separate environments and you need to write a bunch of boiler plate to bridge the observables to the inputs. There&#x27;s no way in hell we&#x27;re ever going to be able to move all the old code over to strict null checking, so we&#x27;re missing out on a lot of the benefits of Typescript.<p>I don&#x27;t agree with Angular&#x27;s decision to have component classes that get newed once and then kept around for a long time and manually updated. It&#x27;s much less ergonomic than React&#x27;s way of doing things, and the statefulness leads to real bugs. The untyped templating language is just... bad. Quite often typos and bugs lead to JS errors being spammed to the console at ~60Hz, which used to freeze my browser (though I think Firefox has fixed this by now).<p>And I haven&#x27;t seen a single benefit of this! My co-worker (who picked Angular and has previous experience with it) cites performance, but honestly the only performance related comment I have with is that my high-end Thinkpad has trouble keeping up with the build system.<p>Are we using it wrong? Probably. But we&#x27;re not being clever. We started from simple examples and moved from there. I read documentation and tutorials, and I still feel like there&#x27;s so much I don&#x27;t understand. After four years.
ralmidani11 个月前
Are you trying to find a new role or build something for yourself?<p>Is an SPA actually required? You might be able to build what you need using tools that involve less mental and technical overhead. Take a look at htmx, UnPoly, Rails&#x2F;Hotwire, Phoenix LiveView, and&#x2F;or Laravel LiveWire. Or maybe even good old-fashioned server-rendered HTML if you don’t need to build something that’s highly interactive.
rcavezza11 个月前
I think it usually comes down to Angular vs React for most legitimate decisions for longer term, maintained projects. I prefer Angular because all the major modules are built-in and you know what to expect when you open a new project. React reminds me of PHP sometimes because you never know what you&#x27;re walking into. And two different React projects can look drastically different.
dudus11 个月前
Unfair comparison. You should compare Angular with Nextjs and Nuxt. I&#x27;d throw in a few more options I think are worth considering, Astro, Qwik and SolidStart. My preference in order is:<p>Astro - Great DX, interop with any other framework, ship HTML by default.<p>SvelteKit - This one is my favourite to use. Avoids JSX, full stack, great DX. I think this one is similar to Vue&#x2F;Nuxt, more a matter of taste than actual difference.<p>React&#x2F;Nextjs - largest community, most number of jobs, courses, trainings.<p>SolidStart - Solid is just Web components underneath. It&#x27;s the most vanilla of the list. It&#x27;s a great alternative for smaller projects where you want to reduce the amount of &#x27;magic&#x27;.<p>Angular - Google support and not much else. I wouldn&#x27;t start a new Angular codebase in 2024, but if I had one I&#x27;d be happy to work on it and keep it up to date. The framework is mature and new features are still being added.<p>Lit - I&#x27;m adding this one as a bonus. If your main goal is to ship a component library I&#x27;d look into this one.<p>HTMX - skip this, it&#x27;s just a meme
评论 #40731131 未加载
iLoveOncall11 个月前
Angular is much more mature and stable. React deprecates half of their (major) features and changes the way to do (basic) things with every new version.<p>I have used both professionally at the FAANG I work at and React is simply not a viable choice for a long-term project.<p>If you had learned Angular on the version 2 and now picked up a project with the latest version (18), 95% of the features would work exactly as you remembered.<p>React went from advising to declare components as functions, to declaring them as classes, back to functions (and will probably go back to classes in a few versions given their track record). 90% of the resources you will find online will give you code that is either deprecated or doesn&#x27;t follow the current recommendation.
评论 #40730896 未加载
Decabytes11 个月前
I&#x27;m no web developer but I know that my company completed a migration to Vue a few years ago. When I&#x27;ve seen this conversation in my travels the answers are usually, React for Ecosystem&#x2F;Legacy, Vue for new projects. But again I&#x27;m no web dev
rafark11 个月前
For my new project I wanted to try something new but I ended up going with React again. At the end it was the right decision for me because of the libraries I ended up using. The community&#x2F;ecosystem is just unparalleled. Whatever library you need there’s a big chance someone has built it for React. If you’re learning a new concept or tutorial there’s almost always a section about implementing it in, or the examples are in react.
jccooper11 个月前
I really like how Vue lays things out; very clean and comprehensible. The official docs are pretty great, and there&#x27;s generally one obvious forward path.<p>But if you&#x27;re doing anything weird there&#x27;s a lot more out in the world for React. Even though it&#x27;s kind of a big mess, quantity has a quality all its own.
victorbjorklund11 个月前
Svelte.
serial_dev11 个月前
I know it wasn&#x27;t the question, but: You can make anything work with any of those.
评论 #40730906 未加载
vintageclothldn11 个月前
I would personally use React out of the 3 as it&#x27;s the best maintained, although it depends on the complexity of the project and whether something lighter could be better.
metaketa11 个月前
Elm and ReScript. Joys to work with, correvctnes guarantees
DrDroop11 个月前
I would use SolidJS with SolidStart because I think technical merit is more important then something with a lot of social proof.
lamroger11 个月前
React also gives access to React Native if you&#x27;re ever interested in mobile
评论 #40730753 未加载
the__alchemist11 个月前
HTML + CSS + [JT]S
评论 #40730619 未加载
fzeindl11 个月前
Next.js (react)
djaouen11 个月前
Among React, Vue, and Angular, I would go with PETAL lol