3 ms·
I'm currenlty working on a project which has used styled-componentes extensively. I plan to entirely remove it (and I am considering tailwind or vaniall CSS to
by mehdix 4y ago
I'm currenlty working on a project which has used styled-componentes extensively. I plan to entirely remove it (and I am considering tailwind or vaniall CSS to replace it) for the following reasons:
1. It increases mental overhead. It is not possible to tell whether a component contains pure CSS styles or adds some functionality, unless you open it and read its code (in that point, it has lost all of its benefit for me). With CSS classes or even HTML style attribute, this distinction is immediately obvious: style vs. function.
2. It clutters the codebase. You'd find all sort of little components sprinkled everywhere.
Both of the above critics could be addressed by implementing a convention, however. For example limiting the use of styled-components to a specific package. The second issue is mostly programmers' fault, not styled-components. However, with CSS I don't have any of these problems to begin with.