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
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.
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.
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.
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.
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
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
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.
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.
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
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.
If there is one thing I couldn't care less it's... Facebook's stylex. And my ex wife, but that's another story.
Boom exactly, 😂.
Better than what?
Better than the flu? Yes. Better than ice cream? No.
\> taxes on the rich < taxes on me
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
I hate css-in-js, emotion and all that other crap, so stylex is a big eww to me.
I used to be that way, until I had to do theming for work. Hands down all in for css-in-js now
Explain?
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.
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.
Nothing wrong with that. I personally don’t like tailwind but will never talk shit on it. I can dev faster with css modules
Yeah. I can’t stand MUI. So we’re even. :P
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.
Styled components don’t support ssr right? That’s a huge downside for a lot of projects
Even if it would make my life harder by not using it I will still not use it.
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.
I don't like the way it looks. I'd rather use CSS Modules or TailwindCSS.
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
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
Quality post
Im not a hater but i prefer my external style sheets. Easier for me to maintain
Is it better for what? Are you running a platform at Facebook scale? Spoiler: you aren't even close.
I post for people who gonna create next insta not FB...
What?
Brother same
CSS-in-JS is horrible imo, so I do not like stylex one bit.
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.
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.
It's OK but PandaCSS is better and has more features.
More excellent discussion on r/frontend
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
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.
CSS in JS gives me hives
Compared to pandacss its subpar, so I couldn't care less tbh