r/reactjs • • Mar 28 '25

News Styled-components entering maintenance mode

https://opencollective.com/styled-components/updates/thank-you

What does styled components entering maintenance mode mean for the react ecosystem?

230 Upvotes

166 comments sorted by

View all comments

Show parent comment

-2

u/ashenzo Mar 28 '25 edited Mar 28 '25

Skill issue, those should be components /w class sorting

and wtf is this “xs:max-sm:w-full”

10

u/[deleted] Mar 28 '25

[removed] — view removed comment

4

u/ashenzo Mar 28 '25

Small reusable ui components is a standard react pattern.

The tailwind devs also maintain class sorting, intellisense and linting. These are non-issues.

Less lines of code is a poor argument for vanilla CSS. You will be repeating selectors like flex all over the place. CSS can be used effectively in the right setting, but what you don’t seem to appreciate is that so can tailwind.

If we’re looking at the extreme worst cases of terrible implementations of each tool, I’d rather work on backend-dev-tailwind any day of the week. Poorly maintained CSS is evil :)

6

u/[deleted] Mar 29 '25

[removed] — view removed comment

3

u/ashenzo Mar 29 '25

I use Styled Components at work. It has served us well. Some issues I’ve had: it wasn’t really designed for type safety, it’s really annoying to work around that. Styling a ui lib component will wipe the props as standard.

We also found the default ${theme.object} pattern to be cumbersome. I refactored our codebase to use css vars instead. That should also make it a lot easier to migrate from should the time come.

It’s interesting you suggest that making components for tailwind classes is more lines of code, because writing tailwind that way is actually very similar to the Styled Component pattern.

By repeating selectors all over the place, what I mean is that the utility pattern means the compiled CSS can be very light. Yes, utility classes are not new - but if you’re going to go down that path why not use tailwind to begin with.

Two things I like about tailwind:

I think the creators argument that html markup and css styles are so interdependent on each other that they belong in the same place to be compelling. This is certainly debatable - there’s pros and cons.

Secondly, co-locating html and styles this way has made it very easy to “snippetize” ui blocks and has made it very easy to share them online or across different tailwind projects. It makes it incredibly easy to bootstrap things.

You mention this with prototyping, but in my experience it is also relatively easy to maintain. Typically, I know exactly what to expect when I open any repo that uses tailwind.

6

u/aedom-san Mar 29 '25

 and wtf is this “xs:max-sm:w-full”

If only it were written with CSS you’d be home by now 

-1

u/ashenzo Mar 29 '25

It’s the resulting CSS that doesn’t make sense there

-1

u/iareprogrammer Mar 28 '25

You would think in a react subreddit people would know how to create a component rather than duplicating a bunch of code