2 ms·
Personally, I like to have composition, logic, and styling be separate files. For me this boils down to html/framework, scripts for heavy logic, and css. This w
by baerrie 3y ago
Personally, I like to have composition, logic, and styling be separate files. For me this boils down to html/framework, scripts for heavy logic, and css. This way, I can change composition, logic, or styling without fear of muddying the other and without the overhead of ensuring there aren’t regressions from forgotten dependencies. Tailwind muddies composition with styling, giving a sense of consistency with their classes but ultimately putting the burden on the developer to ensure that the whole confusing list of classes remains when changing composition. With a single class per component or styled components, this risk is avoided completely