YAGNI to the rescue

You spotted an opportunity to optimize, but you were too early. You should avoid generalizing code until it is absolutely obvious that you should.

The more use-cases you have, the easier to know what to generalize. I mean, how can you know which functionality your components share if you don’t even have those components yet?

You can’t.

YAGNI, always good advice.