Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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