DEV Community

Discussion on: How to write a clean code.

Collapse
 
ishanbagchi profile image
Ishan Bagchi

I understand you. Here in my example in OtherComponent it is ok to change just 2 lines if there is a mistake. Now just imagine if I had a few more lines of OtherComponent, and I had to change the class name, it would be so much pain to remove all of them and replace it with the new class name. Whereas in MyOtherComponent I just have to change the class name in just one line.