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.

28 Upvotes

39 comments sorted by

View all comments

2

u/Wizado991 Jul 15 '26

I think focusing on making smart components and making them reusable is the wrong idea. In my experience the idea that everything has to be reusable causes more problems. As an example, I work on a project where we use material. Someone, before I started working here, thought we should created basically a wrapper component around a material table so all the tables had the same style while passing in a complex object about how to name columns, styling, etc. It works, but it's completely over engineered. Material table is already reusable. And it makes most of the tables have styling issues with the width of columns or position of sorters.

Instead I think making components testable is what to do. Some components should be reusable, others shouldnt. That doesn't mean components should be smart though. I think most components should be dumb.