I was at ReactEurope last week, and thoroughly enjoyed Michael Chan’s talk on how and when to use inline styles in components, and when to use css.

If you haven’t seen it, watch it now, it’s great.

Back? good. I’ve been following this space all year but Michael basically shoved me over the line that Thursday morning in Paris.

As someone who works on open source react.js UI components, I love the idea of inline styles. All the concerns about preprocessors, supporting less vs. sass, themes, build processes and so on just disappear. Want my component? just use it! no worries about distibuting css. Want to change the theme? extend this object! so simple.

Especially with the advent of packages like Radium and color that make writing css in javascript as easy as writing it in, well, css.

My problem however, and the thing that blocks me from actually embracing css in javascript, is that nobody seems to have a good answer to “what about server-side rendering”.

Now, I don’t do a lot of server-side rendering (yet). But one of the things that I really love about React is that it has a good solution when server-side rendering is important.

And regardless of whether I render on the server in my projects, if others are to be able to reuse my components I have come to learn they will want to render on the server; and if they can’t, my work is less valuable to the community as a whole. Who would want that?

So let’s talk about it.