Managing duplication and creating reusable abstractions.
Tailwind는 오직 low-level utility class만 사용하여 디자인을 구현하는 utility-first workflow를 장려한다.
하지만 이러한 방식은 프로젝트 규모가 커짐에 따라, 공통되는 utility 조합combination들을 반복하고, 같은 디자인을 여러 곳에서 다시 만들어야 하는 문제점이 있다. 예를들어 아래 디자인을 구현한 코드를 살펴보자.

<div>
<div class="flex items-center space-x-2 text-base">
<h4 class="font-semibold text-slate-900">Contributors</h4>
<span class="rounded-full bg-slate-100 px-2 py-1 text-xs font-semibold text-slate-700">204</span>
</div>
<div class="mt-3 flex -space-x-2 overflow-hidden">
<img class="inline-block h-12 w-12 rounded-full ring-2 ring-white" src="<https://images.unsplash.com/photo-1491528323818-fdd1faba62cc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80>" alt=""/>
<img class="inline-block h-12 w-12 rounded-full ring-2 ring-white" src="<https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80>" alt=""/>
<img class="inline-block h-12 w-12 rounded-full ring-2 ring-white" src="<https://images.unsplash.com/photo-1500648767791-00dcc994a43e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.25&w=256&h=256&q=80>" alt=""/>
<img class="inline-block h-12 w-12 rounded-full ring-2 ring-white" src="<https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80>" alt=""/>
<img class="inline-block h-12 w-12 rounded-full ring-2 ring-white" src="<https://images.unsplash.com/photo-1517365830460-955ce3ccd263?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80>" alt=""/>
</div>
<div class="mt-3 text-sm font-medium">
<a href="#" class="text-blue-500">+ 198 others</a>
</div>
</div>
이 가이드에서는 이러한 문제를 해결하는 여러 방법과 언제 각 방법을 사용하는 것이 좋은지를 다룰 것이다.
중복이 한 파일안에, 가까이에 모여 있는 경우라면, multi-cursor editing이 가장 쉬운 해결책이 된다고 한다. 중독되는 class name들을 동시에 선택해서 수정할 수 있는 것이다.
You’d be surprised at how often this ends up being the best solution. If you can quickly edit all of the duplicated class lists simultaneously, there’s no benefit to introducing any additional abstraction.
컴포넌트를 추출하거나 새로운 custom class를 만들기 전에, 추출해낸 패턴을 실제로 두번 이상 재사용될지 확인해봐야 한다.
어떤 페이지 내에서 반복되는 디자인 요소는 루프를 통해 렌더하면 실제 마크업은 한번만 작성해도 되는 경우가 많다. 예를들어 맨 위에서 언급했던 디자인의 duplicate avatars의 경우, 실제 프로젝트에서는 대부분의 경우 루프로 작성될 것이다.
map을 사용하는 방법도 포함된다.
