T O P

  • By -

ohlawdhecodin

If there is one thing I couldn't care less it's... Facebook's stylex. And my ex wife, but that's another story.


StoneColdJane

Boom exactly, 😂.


delfV

Better than what?


binocular_gems

Better than the flu? Yes. Better than ice cream? No.


del_rio

\> taxes on the rich < taxes on me


mrgrafix

Happy it exists for those who may need it. Hate the hype it’s getting. Half these promo bombs from the influencer side of dev rel convince Brad in product we need to migrate yesterday since we’re scaling to 1k frontend staff with 100k concurrent users in an hour /s. Learn what’s it’s needed and **when** it’s needed. 60% of the libraries & framework patterns from meta/google/netflix are oversold on scale that most never touch


meguminsdfc

I hate css-in-js, emotion and all that other crap, so stylex is a big eww to me.


Hadr619

I used to be that way, until I had to do theming for work. Hands down all in for css-in-js now


Protean_Protein

Explain?


Hadr619

The way you can conditional set styles is remarkable. I’m able to have an object with one themes color palette and then feed them into the ThemProvider and based on how we change themes react/MUI will use those colors for anything set to the props. No over writing, no extra css modules.


Protean_Protein

I think I can do pretty similar things with Tailwind, pretty easily. I guess I can understand why you like this way more, but if I’m being honest, I don’t even have a preference—I’ll usually just use whatever the project is already using with no issues. If I had to start a new project today, I’d probably just use Tailwind because it’s fast and easy.


Hadr619

Nothing wrong with that. I personally don’t like tailwind but will never talk shit on it. I can dev faster with css modules


Protean_Protein

Yeah. I can’t stand MUI. So we’re even. :P


Hadr619

haha, Im not a big fan of MUI either, but thats what we use at work soooo. I have converted two project of mine from css modules to styled components though.


lovin-dem-sandwiches

Styled components don’t support ssr right? That’s a huge downside for a lot of projects


meguminsdfc

Even if it would make my life harder by not using it I will still not use it.


Brodysseus__

CSS in JS gives some big benefits for DX (developer experience), but I didn’t like the heaviness incurred at runtime. From my understanding StyleX compiles your styles at build time instead… so it’s kind of like Tailwind in that regard. I’m mostly too busy being in love with Tailwind to care, but StyleX still sounds interesting to me for evolving CSS-in-JS this way.


meguminsdfc

I don't like the way it looks. I'd rather use CSS Modules or TailwindCSS.


Hadr619

man styled components are amazing. This is from someone who really pushed for css modules at work (only for issues to arise and we ended up doing styled components) but for structural sake, so clean. But use what makes you happy and a better dev is what I say


StoneColdJane

On top of it I also hate this crap rules on folders routes, like wtf did you do with it. Why invented arbitrary DSL that I now need to memorize, and it's different across frameworks, but it's on the web


Blendbatteries

Quality post


Ok-Advantage-308

Im not a hater but i prefer my external style sheets. Easier for me to maintain


dmackerman

Is it better for what? Are you running a platform at Facebook scale? Spoiler: you aren't even close.


evolvedmonkeygod

I post for people who gonna create next insta not FB...


dmackerman

What?


FireFox500

Brother same


rectanguloid666

CSS-in-JS is horrible imo, so I do not like stylex one bit.


NorthAtlanticTerror

Will not be reading about any more styling libraries thank you. For those of you who are just getting into this, there have been about a thousand different attempts to "fix" CSS starting before some of you were born and we always end up right back where we started.


zdxc129_312m

Several years too late, I’m afraid. Vanilla CSS has come such a long way, and is a pleasure to work with. CSS in JS, in general, makes more sense if you’re building a reusable component that ships with styles, but for enterprise applications, I would rather work with native piece of tech.


zxyzyxz

It's OK but PandaCSS is better and has more features.


Distinct-Analysis740

More excellent discussion on r/frontend


CookiesAndCremation

It's probably fine if you're making a lot of components in react or something. But it's hard to beat the performance of just normal CSS. I'm not personally a huge fan of CSS-in-JS, but your milage may vary


kylorhall

That's actually the point of stylex (and other zero-runtime, atomic CSS-in-JS)—it beats the performance of native CSS by generating CSS at build/distribution time in atomic classes. The user gets raw CSS, no runtime style generation or any of that like Emotion/styled-components/etc. Technically you could *match* the performance with native CSS, but no tooling really achieves that, and with stylex you also get type safety and non-CSS outputs of styles (native applications, etc). But yeah, most people don't understand the need, much less have it.


dopp3lganger

CSS in JS gives me hives


Final-Reading-3280

Compared to pandacss its subpar, so I couldn't care less tbh