by BeeFriedman on 6/19/24, 4:47 PM with 44 comments
by montroser on 6/19/24, 6:03 PM
But really, if you just want to get things done without arguing about the twenty different ways it _could_ work, then Vue.
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.
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.
by GavinAnderegg on 6/19/24, 6:07 PM
If you're interested in another option, I really recommend looking into Solid.js. It'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 "signals" 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's compiled, which keeps the end product small and quick, but also can help find some issues before runtime.
by speedgoose on 6/19/24, 5:27 PM
Svelte is nice but I like react/mobx more.
by apitman on 6/19/24, 6:07 PM
by barnabee on 6/19/24, 4:58 PM
by theonlyjesus on 6/19/24, 5:57 PM
by maremmano on 6/19/24, 4:57 PM
by rvense on 6/19/24, 7:02 PM
I would not pick Angular again for a new project under any circumstances.
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.
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'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's no way in hell we're ever going to be able to move all the old code over to strict null checking, so we're missing out on a lot of the benefits of Typescript.
I don't agree with Angular's decision to have component classes that get newed once and then kept around for a long time and manually updated. It's much less ergonomic than React'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).
And I haven'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.
Are we using it wrong? Probably. But we're not being clever. We started from simple examples and moved from there. I read documentation and tutorials, and I still feel like there's so much I don't understand. After four years.
by ralmidani on 6/19/24, 6:12 PM
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/Hotwire, Phoenix LiveView, and/or Laravel LiveWire. Or maybe even good old-fashioned server-rendered HTML if you don’t need to build something that’s highly interactive.
by rcavezza on 6/19/24, 5:43 PM
by dudus on 6/19/24, 6:19 PM
Astro - Great DX, interop with any other framework, ship HTML by default.
SvelteKit - This one is my favourite to use. Avoids JSX, full stack, great DX. I think this one is similar to Vue/Nuxt, more a matter of taste than actual difference.
React/Nextjs - largest community, most number of jobs, courses, trainings.
SolidStart - Solid is just Web components underneath. It's the most vanilla of the list. It's a great alternative for smaller projects where you want to reduce the amount of 'magic'.
Angular - Google support and not much else. I wouldn't start a new Angular codebase in 2024, but if I had one I'd be happy to work on it and keep it up to date. The framework is mature and new features are still being added.
Lit - I'm adding this one as a bonus. If your main goal is to ship a component library I'd look into this one.
HTMX - skip this, it's just a meme
by iLoveOncall on 6/19/24, 6:04 PM
I have used both professionally at the FAANG I work at and React is simply not a viable choice for a long-term project.
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.
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't follow the current recommendation.
by Decabytes on 6/19/24, 6:09 PM
by rafark on 6/19/24, 6:10 PM
by jccooper on 6/19/24, 6:10 PM
But if you're doing anything weird there's a lot more out in the world for React. Even though it's kind of a big mess, quantity has a quality all its own.
by victorbjorklund on 6/19/24, 6:01 PM
by serial_dev on 6/19/24, 6:11 PM
by vintageclothldn on 6/19/24, 5:37 PM
by metaketa on 6/19/24, 6:02 PM
by DrDroop on 6/19/24, 6:13 PM
by lamroger on 6/19/24, 5:56 PM
by the__alchemist on 6/19/24, 5:36 PM
by fzeindl on 6/19/24, 6:03 PM
by djaouen on 6/19/24, 6:48 PM