Browse Source

Update explanation of CSS-in-JS

A post-merge comment for the original PR for this section mentioned that not all libs actually extract static stylesheets (and docs shouldn't explain implementation details of 3rd party libs unnecessarily, as a rule)
main
Alex 7 years ago
committed by GitHub
parent
commit
501293a425
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      content/docs/faq-styling.md

4
content/docs/faq-styling.md

@ -40,9 +40,7 @@ CSS classes are generally more efficient than inline styles.
### What is CSS-in-JS?
CSS-in-JS refers to a pattern where CSS is written with Javascript, then extracted into a stylesheet.
[Comparison of CSS-in-JS Libraries](https://github.com/MicheleBertoli/css-in-js)
"CSS-in-JS" refers to a pattern where CSS is composed using JavaScript instead of defined in external files. Read a comparison of CSS-in-JS libraries [here](https://github.com/MicheleBertoli/css-in-js).
_Note that this functionality is not a part of React, but provided by third-party libraries._ React does not have an opinion about how styles are defined; if in doubt, define your styles in a separate `*.css` file as usual and refer to them using [`className`](/docs/dom-elements.html#classname).

Loading…
Cancel
Save