So far the main reason I like Angular over react is because Angular is a full framework with everything included that you need to build front end applications. But I'm trying to compare it to Next.js which I have not used before. Next is also a full framework and and seems like it might handle seo with less work than Angular since it does SSR out of the box.
Anyone have reasons why they like Next.js over Angular or the other way around?
Yes this again! I was trying to leave a reply on another post but I guess my reply was to big.
I have been going back and forth between Angular and NextJS for the last few years. When starting a new project all is well and smooth at first with both frameworks but at some point I end up getting stuck on something. Here is what I can say from my experience so far.
Internationalization (i18n)
Angular has built in support for i18n which can take the text from your DOM directly and export them to translation files. NextJS has several libraries for i18n but all require you to use json files to define your messages to be translated. What I don't like in NextJS is that it requires you to do a lot of changes to your app's structure to achieve i18n. For example add logic to the single middleware file, add `(locale)` group to your app directory and move everything under there and use some i18n-specific routing functions. Also I have to import a different function each time to `useTranslations/getTranslations` depending whether I am in a server or client component. Personally I don't like this approach because it makes text hard to find and understand which text goes where. React however has a great ecosystem of vscode plugins that can help you with that mess.
On the other hand, Angular's built-in translation system will build one app per language and you essentially have to use some server directives (NGINX for example) to point to different urls/paths to display a language. That has been working great for me so far but the only drawback is that you can't have any server or remote file to use for translations since those are done on build time. It might be possible but I have never tried it.
Routing
I can't emphasize enough how much I hate routing in NextJS. It's a complete mess. Router groups, Layouts, Parallel routes, intercepting routes and so on. Even with years of experience, it is still hard for the eyes to look at a project and easily understand how everything is wired together. Also while developing, usually any changes to your app structure are not always reflected immediately and you more often than not have to restart your app to see the changes. Also what about when you want to use some specific guards/protections for a route? You have to add some custom logic into the middleware file which again is not ideal.
Angular's routing system is pretty good and flexible. You can apply a route guard through the `canActivate` param and that will also protect the children of that route. It's pretty flexible. The only real issue I faced with Angular's routing is that you don't have a generic/centralized way for handling 404 errors and redirects. Let's say for example you have a route `/blog/:slug` which gets a single blog post by `slug`. You have to manually add some logic in your resolver to handle any http error and do the redirects manually to the 404 page. I haven't found a nice way to generalize this behaviour so far.
Caching
Nextjs has a pretty decent caching mechanism for http requests and other things like memoized callbacks and computation. Even though it's a bit hard to understand at first, once you do it all makes sense and is flexible enough. In Angular there are very little helpers/tools for caching but you can always use signals or local variable in a service for example to check for cached data. That means doing a lot of manual work if you want to work with caching in Angular.
Data Submission
Angular has a very intuitive approach to building forms. Creating custom form controls is very easy and works very nicely with the built-in Forms Module. Honestly, it has been a pleasure working with forms in angular. What I usually do is create a wrapper `FormField` to use to display error messages and some other common things for form controls. Then by extending Angular's `ControlValueAccessor` I can literally create any kind of input component and reuse it in many forms. The only issue I faced working with custom form components is that sometimes change detection gets confused about a component value and you might run into some issues if you are not careful.
In React, there are several libraries that help you build forms and manage their state. They all work pretty good but you are required to write a lot of code and logic for each form which can be very frustrating when you have an app that uses a lot of forms like an admin dashboard for example.
Server Actions
NextJS can run server-only code and you can tightly bind forms to call a server function/action that will only run on the server. This sounds promising but trust me it is a nightmare to work with. I find my self always moving things around in my code because NextJS complains all the time - "This can't run on the server". "This can't run on the client", "The library uses node specific imports and I can't run that" and so on. In general, server actions are nice as long as you can deal with all those limitations.
Writing Components
React is easier and more efficient when it comes to writing your own components. No argument there. With that said, I still prefer Angular because I can work more efficiently when I need to use some common state/service. I can have all my state in a service (whether using signals or Observables/Subjects) and have several components react to those state changes. That brings me to my next point which is state management.
State Management
In Angular you can have signals and a shared service (which is provided in root context) and you can inject that service to any component that needs to use it. Now compare that with all the "Lifting the state up/down" and wrap everything in a Provider nonsense in React. That simply sucks - end of story.
Working in Monorepos
If you are ever building several apps in a single codebase that need to share code; Don't even bother using NextJS at all. You want to reuse a shared page in several apps? Good luck. You want to import some common routes/paths used in many apps? You can't. Another scenario where I found Angular better is when I wanted to reuse a library that contained some common images like logos and category images in several apps. In Angular you can just defined a wildcard path to your `project.json` and you can reference say `/shared-assets/images` path to anything in that library/path. In NextJS/React it is still possible to do that but you have to import the images into your code and use them as JSX components or something similar.
SSR and SEO
Both frameworks has good support for SSR. Don't pay attention to the articles that talk about NextJS SEO is better, it really doesn't matter. There are ways in both frameworks to export some Meta Tags in your DOM and server render a page. In NextJS however it's much easier
Performance
Unless you are building the next facebook/reddit or the next big thing there is no reason to bother with the performance. Both frameworks have excellent performance and the difference, if any, might be a 5-10ms. Your 10 users won't care or notice any difference and neither should you.
Ecosystem
NextJS and React have a larger community. If you ever need anything special, there is propably a library for that. In Angular however, I find my self building most things from scratch. I'm not using any Component libraries like Material or PrimeNG maybe that's why. Also you can't find many up-to-date tutorials for Angular compared to React.
Overall Developer Experience
Angular has a larger learning curve BUT once you get the hang of it you can trust that it won't change much in the next couple of years :). I can say that both frameworks have their frustration moments but I usually find my self in that situation more often with NextJS/React. That is usually because I have to use a lot of third-party libraries and sometimes it's hard to debug or event understand what's going on. On the long run, I spent more time reading when working with React.
Conclusion
Even though I lean more towards Angular, NextJS is a more popular choice and a larger community. Angular works for me because I am a freelancer and I have the option to choose what to work with. If someone was looking to get experience for a job then definitely you should learn React.
Videos
I’m building a web app for a job portal specifically for school staff and I’m torn between using Next.js or Angular. My front-end developer is advocating for Angular, but others have mentioned that it’s better suited for larger projects and might be overkill for my needs. Additionally, I’ve heard that Next.js is faster than Angular—is that true? I’d appreciate any advice!
I would really like to know if someone with a extensive experience with both frameworks could explains the real selling point of one framework over another. All across the internet, I can only find the same arguments over and over again, "it depends on your needs", and so on. I'm a senior front end dev, doing NextJS for many years, and I was using AngularJS ten years ago, but have dislike it very much. I genuinely would like to know more about Angular.
So far the main reason I like Angular over react is because Angular is a full framework with everything included that you need to build front end applications. But I'm trying to compare it to Next.js which I have not used before. Next is also a full framework and and seems like it might handle seo with less work than Angular since it does SSR out of the box.
Anyone have reasons why they like Angular over Next.js or the other way around?
Edit: My use case is mostly for public web sites that I develop in my free time. Youtube and ecommerce style sites, etc.
Hi, I have been using Angular to create web apps for some time. I have built 3 MVPs and worked on a larger-scale Angular project as part of a team. Since I want to extend my career into freelancing, I’m looking to get into React and possibly Next.js.
I’ve played around with React, Next.js, and React on Astro.js, and so far, I’ve enjoyed it for simple use cases. Now, I have a new client for an MVP of a relatively small application, and I want to build it using Next.js to gain more experience. Even though the application is not very large right now, I want to design its architecture in a way that allows it to scale without becoming a mess.
I have a question: In Angular, when adding a feature (for example, in a Tender Management Application), I would first create the Tender type in the models folder. Then, I’d create a service that manages the logic and state of the tender—not just fetching data, but also handling the current tender data that gets manipulated across different parts of the app. This service would be injected into any component that needed access to or could modify that data. After that, I’d organize the components by their related features and set up routes. I would also lazy-load each feature to ensure the bundle size doesn't get too large as the app grows.
I’m not saying this is the only way to do it, or that I’m doing everything perfectly, but this approach generally keeps the Angular app clean, and I can easily add or remove features without things getting messy. Plus, after a break, it's easy to understand what’s going on.
Now that I’m new to Next.js and React, I’m trying to figure out how to structure an app at a larger scale. I’ve read about Redux, but it seems like overkill. I wonder if I can create something similar to services and use them as you would with dependency injection. Is it feasible, for example, to create a Zustand store for each feature’s state and import that?
How do you handle splitting up the app, similar to lazy loading in Angular?
Thanks in advance. I have talked to chatgpt but wanna hear real experiences.
So I'm a developer of 10 years and 4 years of React. I never had the chance until recently to try out NextJS (v14).
NextJS is built, of course, on top of React, but the SSR and the whole surroundings features that NextJS provides you out of the box sounds good at the beginning, but I've encountered WAY too many bugs related to those features.
Now don't get me wrong, NextJS is NOT Angular, but due to the way that Angular comes out of the box with its own features, similarly to NextJS, I've noticed that the flexibility that React offers compared to Angular some times fades away, which leaves you no choice but to develop in a certain manner to match NextJS' methodologies.
Now this might be a good and a bad thing, because just like Angular, that consistency might lead to predictable and more readable code for those coming to another NextJS project. BUT, the first thing I noticed was reoccurring bugs, just like in Angular, which they either had no solution, due to the way Angular is built and you are left with the need to switch your developing techniques or needs, or had you find a REALLY terrible workaround (which in most cases was a workaround that many people had to do to overcome that specific issue) for that solution, which in the majority of the cases leads to code that is more complex than regular React but does the same thing as React to overcome the blockage that NextJS created.
Now this is just my opinion and I would love to hear your's on the matter.
For this project I decided to go back to React, but maybe when I'll feel that NextJS has developed a bit more flexible approach to come back to the flexibly that I love about React I'll come back.
Hello! I am a graduating student and a company offered me a job as a full stack developer. I'm planning to accept it and start working on August (after my graduation) unless I get a better offer. This company uses Angular for frontend. I have a basic knowledge in Angular but I'm more experienced and comfortable in React. To be honest, I like React more because of the community.
I have approximately 3 months to study anything related to frontend. Help me choose between diving deeper to Angular before my job starts or continuing React particularly NextJS. I'm thinking that if I choose to learn more about Angular now, my job will be easier. On the other hand, if I choose to learn NextJS, I can have more opportunities even outside my work (this is what I'm thinking since there are more opportunities with React - correct me if I'm wrong).
Angular since it’s what your job requires and you’ll want to do good at your job. Once you’re comfortable with Angular, then do React and NextJS on the side for your future employability
I did not expect answers leaning towards angular in a react subreddit. Thanks for the answers. I have decided to start relearning Angular. Wish me luck!
I am working in a company who has a ERP System which is now in angular js and for backend we are using .net core. I want to update the project where backend will be in modular monolith architecture. But i can not decide which will be better for frontend. Next JS/ React JS or Angular. Can suggest which one will be better?
TIA
Guys I am planning to learn Full Stack Development and I am thinking to go with NextJs ot Angular. Let me know your thoughts?
I know this is very old debate but I want to know which is the best tech stack for my next project.
Building a Multivendor Ecommerce Platform for Web, iOS and Android. So I would like to use same code base for all these platforms and I don't want to use node js. My first priority is site speed.
React + Next Js + Capacitor
Angular + Angular Universal/SSR + Ionic or Capacitor
Let me preface by saying, I respect what React did for the frontend dev scene, and I respect it a thousand times more for bringing us ReactNative which is amazing and I'm using it at the moment as someone with 10+ years experience in the industry.
However, I come from Java and other OOP languages in my early days and years ago at my firm, I was responsible for deciding whether we should adopt Angular (2+) or React.
I went with Angular because of TypeScript and it's general stability as a solid framework that came with everything in the box and easy upgrading from version to version. Ultimately, the opinionated nature of Angular was why I chose it because rules equal order and predictability.
As a company, I don't want Jimbo to walk in and debate that he's always built his React apps in this manner or pattern, I want the tool for the job to have a user manual that is to the point, and then I want my employees to focus their efforts on app specific logic, given that the tool (Angular) is fit for purpose which it was.
I always viewed React to be way too volatile where almost everything was valid, libraries upon libraries for each thing.
The only reason we adopted React was for ReactNative, it is a technical marvel in my opinion to use a similar stack to build web apps, mobiles, and potentially desktops (although we use Electron successfully with Angular).
Again, thinking as a company rather than an individual, I was flabbergasted as to why these major companies would not opt to use a unified stable tool (not even Angular specifically) instead of something so chaotic as React? I thought surely eventually there would be an opinionated way to get shit done with reasonable qualilty and move on.
FAST FORWARD TO TODAY
It appears that day has come, frameworks such as Next and Remix seem to finally "put down rules", de facto standards for React apps that makes the tool predictable from project to project and less prone to "user creativity".
By the way, this is completely normal in all areas of software development EXCEPT the React scene in the past 5 years so I think this sentiment is shared with much of the wider software development comunnities.
And now it's funny to see the React community praise frameworks like Next and Remix when in fact they've been mocking Angular for years because it's too "opinionated" and does "stuff magically under the hood"...
Again, I love React and especially React Native, and I hope my critiscism in this post is not received as "fanboyish" because that is the furthest thing from the truth.
What do you guys think, honestly?
—-
P.S
I’m not saying React is literally becoming an opinionated tool like Angular right now today (which I’d prefer but that’s besides the point), nor am I saying that you cannot still use it as it has been in the past, I am saying that the trend in what direction things are going in however is very clear and that’s what I wanted to raise a genuine conversation about to see what everyone thinks
Any comparison videos or benchmarks that showcases loading speed of angular universal (SSR) vs nextjs? Just so I can understand the hype behind the usage of nextjs.
Im a student and i love nest I did a research and as i see next is not that a good option
Ur opinions pls
Hello, I've been studying JavaScript for several months and the time has come to choose a framework, so whenever I had time, I looked into and studied the concepts of React, Vue, Next.js, Angular, Svelte, and Web Component (Lit), and then tried using each of them. Personally, I did not like the direction of React and Next.js, but I found the experience of using JSX to be intuitive and liked it. However, I had a lot of resistance because of the direction towards SSR, RSC, the heavy bundle sizes, the experience being the opposite of web standards, and especially the feeling that Vercel dominates the framework. Also, personally, the enforced typing of TypeScript and the feeling of being against the flow for not using TypeScript despite the existence of JavaScript + JSDoc made me feel confused. In the midst of this, seeing that Svelte compiles to VanillaJS and having used it, I felt it was very smooth and good, so I have decided to continue studying Svelte up to now. Clearly, I think there will be a significant disadvantage in employment (Vue and React are very popular in my area), and there are only about a dozen jobs for Svelte compared to over 100,000 for React. Despite this, I would like to ask if it's okay for me to continue believing in and moving forward with Svelte. Also, I like the concept of web components, and I'm curious if the support in Lit + Svelte 5? is fully compatible. I would like to know what you think about the decision I've made personally. Thank you.
Which one should I choose if I want to build my own application, product considering I can do anything I want on user web interface and flexibility to deal with interactive elements on web application.
Im a student and i wanna change from react i made a search but i found that next is not that great option so what is best with nest js (i use nest and i love it and it helps me more than express )
I'm about to start building a web project and I'm trying to decide between React and Angular for the frontend. I know both are mature and widely used, but I'd love to hear from those who have experience with both in real-world scenarios:
What are the most significant differences between the two in terms of actual development experience?
What criteria do you usually consider when picking a frontend stack? (e.g., team size, complexity, deadlines, learning curve, architecture, maintainability, etc.)
Have you ever regretted choosing one over the other? Why?
A bit of context: The project involves analyzing vulnerabilities in enterprise applications using AI to suggest mitigation actions. There will also be dashboards for users and managers to track and confirm those actions.
Hi, I am considering to use Next.js for a new start up since the other guy use Next.js.
I am an Angular Developer at my current workplace. I did a React bootcamp back in 2020, but overtime I preferred Angular because of the module feature. So, my knowledge of React and Next.js is outdated.
The current problem with Angular 17 is:
-
the `@defer` feature offers value that is too good to pass up. However, `@rx-angular/isr` is not compatible with Angular 17, yet. In short, I want to use Angular 17 if we are going to start fresh.
May I know why Next.js is better in terms of SEO, and code maintainability, if compared to Angular 17?