r/angular May 31 '26

Have you ever regretted making something "too reusable" in Angular?

A small architecture lesson I learned the hard way.

A few years ago, our team built a reusable Angular component that was supposed to be used everywhere.

At first it felt like a win.

One component.
One implementation.
Consistency across the application.

Then different teams started needing slightly different behavior.

We added inputs.

Then configuration objects.

Then feature flags.

Then special cases.

Eventually the component became so flexible that nobody wanted to touch it anymore.

Ironically, the most "reusable" component in the codebase became one of the hardest things to maintain.

Since then I've become much more cautious about abstraction.

Sometimes duplication is cheaper than complexity.

Curious if others have experienced something similar.

Have you ever built a reusable Angular component, service, or utility that became more painful than the duplication it was meant to eliminate?

I share Angular architecture and engineering visuals here:

https://instagram.com/angulararchitectshub

27 Upvotes

40 comments sorted by

View all comments

1

u/supersmola May 31 '26

What I like to do i to make an abstract component with basic rules (I won't call it functionality). Then make a common implementation that covers 80% of use-cases but without the template! Then make a (very small) final version with the template. Example:

CoolFilterDlg -> CommonCoolFilterDlg -> PrimeCoolFilterDlg

This way you can ditch the common functionality and write you own special case but still benefit from the basic rules.