There shouldn´t be the question if it would be better. The question should be for who?
Really nobody likes this Angular vs React stuff, every solution has it’s pros and cons. The essential question is would you choose Angular because you know React is not the right tool in this case for your customer? Sometimes this also means to send this customer away. But when is React the right tool and when is Angular the right tool? So I´d like to do is not present you a typical Angular vs. React comparison.
Some general key-comparison facts
After reading these key facts you might think React is heaps better because it has more stars, more contributors and fewer issues. But the big difference is the application type and React is still a frontend-library. So if you want to reach the same features with React that Angular brings out of the box you need a lot of components. To give you an impression about how many, you can check this React awesome list. So to update the key-comparison facts table above you need to add the issues and starts of the React components that are provided by Angular out of the box.
So what have we learned already? React is more lightweight then Angular. React gives the developer more flexibility. But with big flexibility there comes the big chance to build legacy code that nobody understands afterwards. It depends on the experience of the developer team you have or hire to build your new shiny Venia frontend.
I often asked myself why Magento choose React as the base for their Venia theme? Sometimes when I’m in a bad mood I hear a voice that is saying: “They liked to mix HTML and PHP and now they like to mix HTML and JS.” and when I’m in a good mood I hear the same voice telling me: “There are more React developers out there, also Magento need a lightweight frontend and not a complete framework.”. You see it depends 😉
I already wrote a blog post about PWA for small- and middle-sized customer (in german). Additional hint: Please do not think that PWA === Headless this is just not true. It is possible to use a lot of features without the need for a headless application. But normally when you do a complete new frontend then you also want to have the headless and offline shopping stuff.
If you want to use Angular as a headless frontend, Magento2 for the backend, Lizards and Pumpkins as a middleware, ElasticSearch for search, payment provider like Klarna or Payone or Paypal and you want an enterprise solution that is unit-tested then you have to ask Flagbit about their solution. In 2019 we will give back our angular storefront and our base components to the community (open source).
At the end I will leave you with a Quote from Andrei Neagoie from 8. November 2018
Angular is the entire kitchen that gives you all the tools necessary for you to build the meal that is your web app . If I am a bank with lots of developers, I like Angular to keep everyone working in the same pattern.
React is the oven. You most likely will need more tools to bake that cake, but it allows you the flexibility to pick and choose what tools you want based on your needs. If I’m a tech company with strong senior developers that can make good decisions, I like React.js.
Vue is the microwave that allows you to get up and running really fast and make your cooking life efficient and easy. If I am a startup with a young developer team and a strict deadline, I like Vue.js.