DEV Community

Discussion on: How do you Refactor a 2,700-Line React Component?

Collapse
 
eabuzaid profile image
Eyad Abu-Zaid

Absolutely amazing and relevant article! I deal with this all the time when I'm working on legacy code.

It's fascinating really how much time and effort you would save if you just apply the simplest of principles and best practices such as separation of concerns and modularity.

I don't think it's just laziness though. It's partly laziness but also the fact that developers have so many requirements that once they get something working they think "good, I'll just optimize it later" and move on to the next thing.

The "broken window" analogy in the book Clean Code best summarizes that thought process in my opinion.

Again, thanks for the post!