Css classname not applied to react component

邮差的信 提交于 2019-12-05 14:06:23

Firstly, you need to guarantee it's defined with: console.log(styles) Im' not sure you import style.scss correctly.

You need to import your scss like... import './styles.scss';

Webpack will take care of bundling your styles so you can add the className as a string on your component.

<div className="bunny">Hello World</div>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!