We’ve all seen them. The huge 400+ line god component behemoths. They can be so large, that it takes the better part of a day to get a high-level understanding of what they do.
In this article, we will take one of these god components and break it down into bite sized and logical units of work. Then we’ll apply the component folder pattern to compartmentalize the pieces.
For our example, I’ll be using a Giphy search app whose file structure looks like this.
It looks pretty simple, but everything (state, view, and data loading) are all in one component. This makes
... read the whole story at medium.com.