Skip to content

Instantly share code, notes, and snippets.

@danny-andrews
Last active October 9, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danny-andrews/19c09efbb71b8b452b2eea9bedee65d2 to your computer and use it in GitHub Desktop.
Save danny-andrews/19c09efbb71b8b452b2eea9bedee65d2 to your computer and use it in GitHub Desktop.
Do You Really Need react-css-modules?: Mixing global and local
// With react-css-modules
import './styles.css';
<div className="global-class" styleName="local-class">Hi</div>;
// With css-loader
import styles from './styles.css';
<div className=`${styles.localClass} global-class`>Hi</div>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment