I introduced styled-components as a cleaner alternative to introduce custom CSS styling for components. However, I really dislike the verbosity and duplicated information when paired with TypeScript.
styled-components seems really great as a custom design system from the ground up. However, because of the heavy TailwindCSS use, most of the powerful features styled-components provides are completely unnecessary.
Most of the verbosity stems from TypeScript. styled-components requires two separate typings, one for typing props that will be added to the component directly (such as adding to className) and one for the template literals. I am sure the code would be much cleaner in a vanilla JS environment
I really dislike the lambdas to access the props.
I will slowly be converting these back to normal components.
They are not actually any shorter, nor do I think they look much cleaner. In fact, I almost prefer how styed-components look. But they are much less annoying.
I introduced
styled-components
as a cleaner alternative to introduce custom CSS styling for components. However, I really dislike the verbosity and duplicated information when paired with TypeScript.styled-components
seems really great as a custom design system from the ground up. However, because of the heavy TailwindCSS use, most of the powerful featuresstyled-components
provides are completely unnecessary.Most of the verbosity stems from TypeScript.
styled-components
requires two separate typings, one for typing props that will be added to the component directly (such as adding toclassName
) and one for the template literals. I am sure the code would be much cleaner in a vanilla JS environmentI really dislike the lambdas to access the props.![CleanShot 2022-12-08 at 01 04 59@2x](https://user-images.githubusercontent.com/6739076/206369994-58eacd0f-96cb-4243-a580-13a205c325c7.jpg)
I will slowly be converting these back to normal components.
They are not actually any shorter, nor do I think they look much cleaner. In fact, I almost prefer how
styed-components
look. But they are much less annoying.