I build distributed frontends using components (preact components, but that's not important). Components are a great unit of composition when the structure of a system cannot be statically determine…
Let's assume you're using some component-based Virtual DOM rendering library like Preact.
Here's a quick intro to how you can make use of CSS Modules today, using Webpack's awesome css-loader.
Foreword: I generally do these things as Gists, but I figured this one is such a common question it would be worthwhile posting here.
JSX is actually quite straightforward: take 1 minute and read this, and you'll understand everything there is to know about this interesting alternative to templates.