Balša Balša - 3 years ago 204
React JSX Question

Using a theme in ReactJS

I have purchased a theme on ThemeForest which I would like to use with my ReactJS project. As I am still learning React, I would like to know if it is okay to simply include Style.css file in 'public/index.html' file just like I would do with any website or is there a way which is specific to React?

Answer Source

You can simply include the style.css file in your index.html and use the CSS classes defined in the stylesheet with your React components. One thing to note is that you have to use className instead of class to reference the CSS classes, because React is basically JavaScript code and “class” is a reserved word in JS. Example:

<div className="my-class">bla</div>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download