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

Practical example of a bloated component

Mohammad Faisal
Level Up Coding
Published in
5 min readOct 12, 2022

--

Photo by Sebastian Herrmann on Unsplash

We are always so excited about the new shiny things that come out every week in the programming world. New ways to structure components, new techniques to reduce that two lines of code, and so on.

But in the real world, things are not so shiny. Often we have to deal with codebases that…

--

--