Back to css module + css variables (inho this will always be viable)
But you can use styled components on server side components. You can extract the relevant stylesheets to plain old css and then pre-render that on build time or on request to server.
Personally I always used a combination of CSS modules and SCSS, it's locally scoped and the styles stay in their CSS files, no JS runtime serialization needed. I don't see any reason to move from this
What about conditionals and states. This just went imperative again...
just use css modules or Tailwind v4
I'll be trying Panda, Linaria and Stylex again soon. I'm not a big Tailwind fan.
The main benefit for me was doing styling in react components since react made a ui library that can't style. Then react did server components so now are forced to use tailwind to style react. So dumb lol. Although I believe scoped styles are now in Apple browsers (who cares about firefox) so that might be a good move forward for scoped component styles.
Next-yak is styled-components literally and works with RSC. Built in rust. Not going anywhere
Now we can write plain css in the jsx by utilizing <style>… finally I can write each component styles in the component itself in normal css
React be like lol, Glad am using Vue
such a great video bro!
Is Emotion still viable or did it die along Styled components? If so what will be the easiest alternative to jump into from this background?
Linaria (zero runtime) and vanilla extract (type safety) look promising, the rest, meh. But tbh there really is no perfect CSS solution so maybe CSS itself is the problem.
I will say, there's still usecases for something that functions exactly like styled components. It's not what I'd choose for "My apps styling framework" but for example I've been working on a dynamic menu builder for two years and styled-components is the easiest way to express extremely dynamic styles, there may be a way to do this in tailwind moving forward though now with some of the new changes in v4.... It's going to be a massive PITA to refactor though
so when i want to relearn web development again and i was about to use styled components i found that it is dead i hate tailwind or almost any frameword that use ready classes and styles i like to write my own css i think i will search about Linaria and see if it suits me or not
MUI’s SX prop as is the best of both worlds.
Here i am, using the browser's native CSS Module Scripts API alongside JS based Web Components and HTML based (Declarative) Web Components, looking at the React hell scape from my window ☕
Good luck for anyone using MaterialUI
PANDA CSS for the love of god PANDA CSS I may have written this before watching the video :P
@yorailevi6747