The main example of CSS-in-JS is Styled Components
CSS is injected into the DOM late, resulting in lower performance
Code management is convenient
There are two issues with most CSS-in-JS
- Performance
- Compatibility
How I'm Writing CSS in 2024
Notes on the state of the CSS ecosystem and tooling.
https://leerob.io/blog/css#user-experience
CSS-in-JS(Styled Components) vs CSS-inCSS(CSS Modules) 성능 비교
지난번 포스팅(CSS-in-JS에서 CSS-in-CSS로 바꿔야 하는 이유) 에는 CSS-in-JS에서 CSS-in-CSS 방식으로 변경해야 하는 이유에 대해 설명했다. 요약해보면, 다음과 같다. 성능에 초점을 맞춘다면 CSS-in-CSS, 개발 생산성에 초점을 맞춘다면 CSS-in-JS 를 사용하는 편이 낫다. 어떤 방식이 더 낫다고 단정할 수는 없으며, 서비스의 용도와 목적에 따라 적절한 선택이 필요하다.
https://blueshw.github.io/2020/09/27/css-in-js-vs-css-modules/


Seonglae Cho