In normal javascript you can grab an element by its id and add a style to it. For example:
var element = document.getElementById("myElement");
element.style.backgroundColor = "#f5f5f5";
My question is how you can do this in react. Is it even possible to add this style?
Also if you can do it to an html5 canvas element.
You just render it with the style
https://reactjs.org/docs/dom-elements.html#style
You have to render it with style as given above.