There are multiple strategies for refactoring. I will show you multiple ways to accomplish the same objective. We will walk through the thought process of why you might want to use one over another. The point is: use what works best for you.
For example, where do you put
.header-image styles? Do you embed them into each sub-component such as the
.title-area? Or do you make a separate partial just for the specific use case of
.header-image? Let’s talk our way through it for you to determine what works best for you.
A rule of thumb for deciding where to put styles is ease of finding your styles when you need to make adjustments. You want to be as efficient as possible. Therefore, you want to divide up your styles so that you can quickly read the file name and know exactly what is in that file. This strategy will help you to streamline, speed up, and be more efficient. It saves you time, which then translates into saving you moola (money).
Hands off the keyboard. Web development starts by thinking first, then planning it out, and then coding it.
Total Lab Runtime: 00:47:58