I'm using react and I found this awesome library that helps you define css classes for components called classNames. I'm also using the webpack css-loader in order to import css into my component and when trying to use classNames with import css I get a syntax error.
Here is my example:
import React from 'react';
import styles from './style.css';
import classNames from 'classnames';
export default class Menu extends React.Component {
render() {
let style = classNames({
styles.someClass: true
});
}
}
How can I use both?