With React Starter Kit's Isomorphic CSS style loader for Webpack how'd I pass in the style object instead of the class name?
We can currently do this:
<div className={s.root}>...</div>
and I wonder if we can do something like this:
<FooBar style={s.root.toObject} />
I'm looking for a solution that also works when server-side rendered.
I assume, you want to convert a piece of CSS into inline style object? E.g.
.comp { border: 1px solid red; }
would become{ comp: { borderWidth: 1px, borderStyle: 'solid', borderColor: 'red' }
. For this task you may want to search for another NPM package (bothcss-loader
andisomorphic-style-loader
are intended to solve a different problem). Try Radium.