3 ms·
I don't like inlining styles as objects in React so I went looking for a solution that would work with the toolchain I'm using for my current project. I'm work
by drhayes9 11y ago
I don't like inlining styles as objects in React so I went looking for a solution that would work with the toolchain I'm using for my current project.
I'm working on a project now that is using a combination of react-css-modules, webpack, and an ExtractText plugin for webpack that means each React component I write can have an associated CSS file.
Each class in the CSS file gets mangled so that it doesn't affect things globally by react-css-modules. Then the ExtractText plugin for webpack pulls all those CSS files out into one, global styles.css file.
Ultimately, that means that my CSS file might actually, over the life of the project, shrink! Unheard of.
In the same project I'm using redux and redux-router. The router consists of declarative components, like "<ReduxRouter />" and "<Route />".