Check out example codes for "changing css using js in html". It will help you in understanding the concepts better.
Code Example 1
document.getElementById("myText").className = "anyNewClass"
Code Example 2
document.getElementById(id).style.property = new style
Code Example 3
<!DOCTYPE html>
<html>
<body>
<h1 id="id1">My Heading 1</h1>
<button type="button"
onclick="document.getElementById('id1').style.color = 'red'">
Click Me!</button>
</body>
</html>
Learn ReactJs, React Native from akashmittal.com