Hacker News new | ask | show | jobs
by GiovanniFrigo 3869 days ago
I suggest you to read this (http://stackoverflow.com/a/31638988/2304450) very good stack overflow answer, you'll find some interesting introduction to inline styles if that's what you were looking for.

A different approach could be to pass a `classScope` string props down to the components, and each component then applies it to the classes it uses (Example: return (<div className={this.props.classScope + "inner-div"}></div>); ). This way we could achieve better css selector scoping, at a cost of a slightly more verbose code when using a component.

1 comments

Also, you can get way more competent answers on reddit (/r/reactjs) or on stackoverflow :)