HI this is Gulshan Negi Well, One of the main arguments against CSS-in-JS is that it can make code harder to understand because it mixes together two separate concerns: layout and behavior. This can make it harder for developers to reason about the code and make changes to it.
Thanks
This looks nice! I was always hesitant about using CSS-in-JS because it adds another abstraction with more or less subtle differences between different implementations, both in DX and in performance impacts.
So far, I'm happy with CSS modules which solve the most important problem of scope in a predictable way.
ecsstatic seems to be the CSS-in-JS solution that's pretty much the closest to CSS modules. You could even use it like that when keeping your styles in a separate file.
So the benefits of ecsstatic over CSS modules that I can think of are:
But I also see drawbacks:
What do you think? Do you agree? Did I miss anything?