1 min readJan 20, 2020
You beat me to the punch here. However, I’m going to add my two cents. The problem is broader than React components. In my opinion, DRY is one of the first design principles a developer can understand. The problem is that when it is applied in the absence of other competing design principles it is often applied awkwardly. In order to effectively apply code reuse the concept has to be abstracted from a set of use cases. It is hard to determine the proper abstraction without a robust set of use cases. It’s usually better to repeat your code until you can effectively formulate the abstraction.