import className from 'classnames'
import './main.less'
// import className from 'classnames/bind'

{/* <div className={cx('starkLess','starkX')}> */}
{/* <div className={className(sLess.starkLess,sLess.starkX)}> */}
<div className={`{sLess.starkLess}{sLess.starkX}`}>
  hi stark
</div>

如果不想写 前缀的sLess.

注意:cx('starkLess','starkX') cx 里面是字符串哦!

import className from 'classnames/bind'

const cx = className.bind(sLess)

<div className={cx('starkLess','starkX')}> */}
  hi stark
</div>

在react中使用 classname处理多个 css 类(class)-王树东