I have been working on web UIs for over a decade when he realized there are two major challenges in front-end engineering: understanding the state and styling its representation. While the first task has become much easier with unidirectional data flow, components styling is still painful. To change that, I started a project called JSS back in 2014 and didn't stop learning and improving it since then.
CSS uses a global namespace for CSS Selectors that can easily result in style conflicts throughout your application when building an application using modern web components. You can avoid this problem by nesting CSS selectors or use a styling convention like BEM but this becomes complicated quickly and won’t scale.
CSS-in-JS avoids these problems entirely by generating unique class names when styles are converted to CSS. This allows you to think about styles on a component level with out worrying about styles defined elsewhere.