React Inline, FluxThis

2015-04-21 17:09:00 +0100 by Alex R. Young

React Inline

If you're looking for a solution for managing CSS in React projects, then take a look at React Inline (GitHub: martinandert/react-inline, License: MIT, npm: react-inline) by Martin Andert. It transforms inline styles into CSS code and class names, so you get a CSS file and a list of class names.

There's an example that shows how the StyleSheet.create syntax can be turned into a more succinct const styles object with a corresponding CSS file.

The project has tests (that are written with ES6 with Babel), and there's a demo site.


Josh Horwitz sent in FluxThis (GitHub: addthis/fluxthis, License: Apache 2, npm: fluxthis), a Flux framework by AddThis. It's designed to make debugging easier, and comes with immutability and performance optimisations.

For more on immutability, see the immutable stores documentation. There's also a non-immutable store known as the ObjectOrientedStore. Internally the project uses immutable, and Babel is also used so all of the internal FluxThis code is ES6.