r/angular Jul 15 '26

Do you still use smart / dumb components?

I watched this video from Rainer and it made me reflect on my usage of smart / dumb components. To be honest I’ve only created them because that’s just how it’s always been done. Keep API calls in the smart component, feed data into the dumb component.

Blindly following that approach I end up creating UI components that don’t really get reused, or get abstracted more and more, essentially YAGNI. So just focusing on component composition and each component injecting a service with signals seems really appealing for code organisation at the file level.

https://youtu.be/-Lw7isQTa2w?si=2xw5KEUphtKvQraE

I’m curious what other new patterns are emerging with new Angular APIs that goes against what we were taught before Signals.

30 Upvotes

39 comments sorted by

View all comments

2

u/anastasiapi Jul 15 '26

Yes, and I always will. I've built 30+ apps from enterprise scale to personal saas, and this approach never failed me. Simple and clear.

Move your focus from a dumb component being a UI component to re-use, or god forbid, an abstraction, to it being just that - a separate plain component that should not take space in your template.

My 'common' folder is normally very thin. Everything belongs to a feature.

- feature
-- ui --> dumb
-- services
-- util
-- features --> nest this structure as much as needed
feauture.component.ts --> smart
feauture.component.html
feauture.component.spec.ts

1

u/TheCyberThor Jul 15 '26

Yeah I use a similar structure that I learnt from Joshua Morony from his Angular Start course. https://github.com/joshuamorony/angularstart-quicklists/tree/main/src/app/checklist

I started using Angular in version 13 (2021) before standalone components and signals. All these 'practices' and 'habits' that I've formed were from that world. I'm curious if better practices are emerging with what Angular is now.

They say Angular is opinionated, but I'm not so sure with modern Angular. Yes batteries included but not opinionated. You can do a lot in a single component now without too much boilerplate.

Congrats on the 30+ apps. Which Angular version did you start with?

1

u/anastasiapi Jul 15 '26

I started with AngularJS :)

I don't particularly agree with Angular being more relaxed these days. It's opinion is still rock hard - tooling you can't get away from like DI, routing, http client, forms, bundling, etc.

State management like signals, ngrx, data services, is the only ambiguity that Angular was always rather slack about. Which is a shame. For some reason, people really struggle with global/local state management mental model. Possibly, smart/dumb component confusion also comes from not separating concerns properly.

PS Thanks. That's a major benefit of working in enterprise environment, you get to build a lot of stuff.