Neither for me. Tho if I have to choose, I would go for styled-components.
The reason being, Tailwind is like an entirely new tool, nothing common with CSS syntax. And knowing how frequently frameworks come and go, I am not sure it's worth investing time in learning something as specific as Tailwind.
It took me about 30 minutes to learn Tailwind so I wouldn't say it's a waste of time. on the contrary, it saves me alot of time when I make small projects compared to regular styling.
as for styled components, I don't see a big difference between that an inline styling so I'd skip it.
Agreed! I think Tailwind solves a specific problem and solves it well. But it doesn't solve all the other problems very well. Personally, I feel it's always more beneficial to know how things work under the hood. Having to write CSS still enforces that practice whereas Tailwind doesn't.
Currently, my favs are CSS modules or Styled JSX, depending on whether I want to style outside or inside of the component, respectively. Both are scoped and support bare CSS, which I love.
I like CSS modules or Styled JSX as both work well with NextJS, which I work with daily. Both have built-in support, meaning I don't have to worry about configuring anything.
I prefer Styled JSX over SC, as it is more close to bare CSS, and CSS modules are not CSS-in-JS solution, so it would not be fair to compare them with SC.
If you are looking for other alternatives, I would suggest looking into Svelte. It allows us to write CSS in style tags, while still working with components. A 'back-to-basics' approach, I really like.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Neither for me. Tho if I have to choose, I would go for styled-components.
The reason being, Tailwind is like an entirely new tool, nothing common with CSS syntax. And knowing how frequently frameworks come and go, I am not sure it's worth investing time in learning something as specific as Tailwind.
It took me about 30 minutes to learn Tailwind so I wouldn't say it's a waste of time. on the contrary, it saves me alot of time when I make small projects compared to regular styling.
as for styled components, I don't see a big difference between that an inline styling so I'd skip it.
I like this comment, I think Tailwind is really helpful for big project but we just need take time to learn it
Thanks for the input! 🙏❤
Agreed! I think Tailwind solves a specific problem and solves it well. But it doesn't solve all the other problems very well. Personally, I feel it's always more beneficial to know how things work under the hood. Having to write CSS still enforces that practice whereas Tailwind doesn't.
Currently, my favs are CSS modules or Styled JSX, depending on whether I want to style outside or inside of the component, respectively. Both are scoped and support bare CSS, which I love.
Oooh, I'll take a look into those two at some point. Would you favour either of them against styled-components?
I like CSS modules or Styled JSX as both work well with NextJS, which I work with daily. Both have built-in support, meaning I don't have to worry about configuring anything.
I prefer Styled JSX over SC, as it is more close to bare CSS, and CSS modules are not CSS-in-JS solution, so it would not be fair to compare them with SC.
If you are looking for other alternatives, I would suggest looking into Svelte. It allows us to write CSS in style tags, while still working with components. A 'back-to-basics' approach, I really like.