I am super frustrated trying to figure out how to change the background of my React app. I can’t even get the first step of getting the wrapper div to fill the window.
I was going to just change the body background, but then saw that this was not advised and there should never be a reason to do this in React. Also, it seems changing the background of a wrapper div on a re-render is way easier than reaching out of the React app to change the body.
I have a strong feeling this is a stupid simple thing that is just eluding me.
body is just an element like anything else and there is one thing you might want to consider: “My app my rules”
I personally struggle to imagine what kind of problem might cause having different classes with different backgrounds and toggling them on body directly from react.
I think I got it… because height is referring to the parent, so in order to get the wrapper to be 100% height of the body, first #root would have to be 100% height of body and body would have to be 100% of html… right?