title: How to use reacts 'onClick' to change a style.backgroundColor of an element
body: <p>Ive been experimenting with react recently and would like to know how to use reacts 'onClick' syntax to change the background color of an element. The relevant pages in regards to this question are on my git hub account and both are <a href="https://github.com/DravionV/My-ReactJS-Experiments/blob/master/src/App.js" rel="noreferrer">App.js</a>
  and <a href="https://github.com/DravionV/My-ReactJS-Experiments/blob/master/src/App.css" rel="noreferrer">App.css</a>.</p>
  
  <p>As you can see; Ive gotten to the point where once you 'click' the element that has the text within it 'click me!' - it calls the function boxClick(). But once that code within box click is ran it give an error -> <a href="https://imgur.com/a/HpyI9" rel="noreferrer">(imgurPic)</a> . Now if this was a vanilla js page I could easily make this work but im new to react. I would like to know how to make this function work properly and also why the current code isnt working. In my mind I have indeed defined 'boxClickCss' when I used a document.getElementsByClassName; which is why I dont understand this error. </p>