I have a loader set up in a div that I want to remove once a certain component is loaded by react. This div exists in my index.html file out side of my components. The code for my div is:
<div class="loaderBackground">
<div class="loader"></div>
</div>
I've tried using refs, but everything I have found seems to imply that the element would need to be in a component, which I would like to avoid.
Is it possible to remove the element without putting it in a component or do I have to fit in my components somewhere?