React add styling to element

In normal javascript you can grab an element by its id and add a style to it. For example:

var element = document.getElementById("myElement"); = "#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.