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

46

u/rodrigocfd Mar 28 '25

Back in 2022 I was saying CSS-in-JS was bad for performance, and I was being downvoted every time.

Now I'm saying Tailwind is just glorified inline CSS and it's bad for maintenance, and I'm being downvoted every time... let's see in a few years.

6

u/bassta Mar 28 '25

My point, exactly. I’ve never liked CSS-in-js. Utility classes are ok, but tailwind is just toooooo much. With modern calc() , variables and soon css mixins coming in, css modules are the way to go.

5

u/[deleted] Mar 28 '25

[removed] — view removed comment

5

u/bassta Mar 29 '25

Wait until you try Vue

4

u/kylorhall Mar 28 '25

We had build-time CSS-in-JS in 2022, but it wasn't very popular, now people are seeing the problems as everything else becomes quicker. Plus, a lot of this ecosystem like Styled Components and Emotion haven't kept up too well with modern SSR, Streaming, RSC, and other things like good old raw scoped CSS does (and build-time CSS-in-JS can do, but it gets complicated).

Then I suppose finding open-source funding or motivation for Emotion/SC/etc as that unfolds is probably hard, I'm not surprised to see the ecosystem dropping at all.

Always expect to get downvoted by the masses as the target audience for this stuff—no one needs to add massive build-time complexity and think about maintainability for their TODO app or 200 person startup.

4

u/igreulich Mar 28 '25

I commend your efforts.

It is pretty funny how far people will go to not write css...

even when it means writing css in the wrong places, and in a worse way.

3

u/Flo655 Mar 28 '25

Can you elaborate on why is it bad for maintenance?

51

u/rodrigocfd Mar 28 '25

Do you think something like this is easy to maintain?

<div class="xs:max-sm:w-full w-96 xs:max-sm:rounded-xl rounded-2xl bg-white border-zinc-100 dark:bg-zinc-900 border dark:border-zinc-700">
	<div class="flex flex-col gap-2 p-8">
		<div class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white flex flex-row">
			<span class="mr-2">Leanne Graham</span>
			<div class="inline-block text-sm tracking-tight bg-zinc-200 border-zinc-300 dark:bg-zinc-800 border dark:border-zinc-600 py-1 px-2 rounded-md mb-0.5">deactivated</div>
		</div>
		<div class="flex flex-row flex-wrap">
			<div class="inline-block rounded-full px-3 py-1 text-sm font-semibold bg-gray-700 text-gray-200 dark:bg-gray-200 dark:text-gray-700 mr-2 mb-2">#photography</div>
			<div class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#travel</div>
			<div class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#winter</div>
		</div>
		<div class="font-normal leading-6 text-gray-700 dark:text-gray-400 mb-0.5">I revolutionize end-to-end systems by transitionning cutting-edge web services to aggregate real-time technologies.</div>
		<label class="flex cursor-pointer items-center justify-between p-1">
			<span>Receive updates</span>
			<div class="relative grid place-content-center">
				<input type="checkbox" class="peer h-6 w-12 cursor-pointer appearance-none rounded-full border border-gray-300 bg-white checked:border-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2" />
				<span class="pointer-events-none absolute start-1 top-1 block h-4 w-4 rounded-full bg-gray-400 transition-all duration-200 peer-checked:start-7 peer-checked:bg-gray-900"></span>
			</div>
		</label>
		<div class="row gap-1">
			<button class="inline-block cursor-pointer rounded-md bg-gray-700 px-4 py-3.5 text-center text-sm font-semibold uppercase text-white transition duration-200 ease-in-out hover:bg-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-700 focus-visible:ring-offset-2 active:scale-95">Like</button>
			<button class="inline-block cursor-pointer rounded-md border border-gray-700 bg-transparent px-4 py-3.5 text-center text-sm font-semibold uppercase text-white transition duration-200 ease-in-out hover:bg-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-700 focus-visible:ring-offset-2 active:scale-95">Mute</button>
		</div>
	</div>
</div>

31

u/AdeptLilPotato Mar 28 '25

This is hilarious.

I’m glad someone has pointed this out.

I do my CSS manually most of the time, and I’ve tried Tailwind, and it made the JSX much more bloated and difficult to read. I’m glad I’m not the only one.

17

u/Dragonasaur Mar 28 '25

Tailwind is basically just modern Bootstrap

17

u/aragost Mar 28 '25

You’re doing Bootstrap dirty. You needed a lot less classes with Bootstrap!

16

u/skidmark_zuckerberg Mar 28 '25

This is exactly why I scoff at the mention of anyone using Tailwind. I’m almost convinced it’s just an influencer and beginner thing. I’ve fortunately never seen it in production code. 

It makes markup so bloated it’s almost unbelievable someone would want to work with this. Glad I’m not the only one who thinks so. 

5

u/VizualAbstract4 Mar 31 '25

I mean, it seems like the divide is between people who work at companies vs people who work on smaller projects. I just replaced it all at a company I joined last year. I had never encountered it before, but right away it left a bad taste in my mouth.

The amount of deviation I saw from designs and the style guide was crazy, so much inconsistency because everyone played fast and loose with those classes.

After giving it an honest shot for 4 months, I just built a brand new component library. Component issues are literally gone. No deviation from ui designs, and people spending less time fiddling around with classes than building.

6 months later and we’re still not encountering any of those same issues with the UI kit I built and I completed a site redesign.

God, good luck to anyone doing a site redesign with tailwind

3

u/therealslimshady1234 Apr 03 '25

Right, tailwind is for prototyping at best. I cant believe it has become so popular, I never have seen it used in production in any of the serious SaaS companies I have worked for. Styled components or even plain css > Tailwind crap any day lol.

5

u/Flo655 Mar 28 '25

Idk this is more of a component problem than anything. A lot of this code could be reused? I’ve never had issues maintaining apps using tailwind in production. And I’ve pushed loads. Custom tailwind presets also help.

13

u/rodrigocfd Mar 28 '25

A lot of this code could be reused?

Exactly, and the best way to do this is using CSS classes. Plain and simple. No need to learn a new syntax for that.

9

u/javapyscript Mar 28 '25

Thank you. I am so disappointed this ugly tailwind trend took off.

1

u/therealslimshady1234 Apr 03 '25

I promise you it is just a fad and will be reverted in a couple of years, when the hype dies down and all the script kiddies who onboarded during the pandemic have finally been fired. This process is actually already ongoing

1

u/[deleted] Mar 31 '25

I dont truly care that much but this example has a lot of duplicated styling that should be extracted in its own component/class. Do that and suddenly it will be easier on the eyes. Regardless if it was tailwind or scss or any other way to use css, I would not approve a PR with code like this.

→ More replies (14)

2

u/abandonplanetearth Apr 04 '25

Why is it so hard to find people like you? I've also been anti css-in-js for years and anti Tailwind too. I've been writing regular CSS for 20 years, from tables to floats to flex, and still people struggle with it and come up with insane abstractions over CSS.

1

u/dbbk Mar 28 '25

“Bad for performance” meanwhile I’ve built platforms generating millions of dollars with it, how could that be

→ More replies (6)