There is actually a lot simpler and cleaner version than using request animationframe or timeouts. Iam suprised no one brought it up: the vanilla-js onload handler. If you can, use component did mount, if not, simply bind a function on the onload hanlder of the jsx component. If you want the function to run every render, also execute it before returning you results in the render function. the code would look like this:
runAfterRender = () => _x000D_
{_x000D_
const myElem = document.getElementById("myElem")_x000D_
if(myElem)_x000D_
{_x000D_
//do important stuff_x000D_
}_x000D_
}_x000D_
_x000D_
render()_x000D_
{_x000D_
this.runAfterRender()_x000D_
return (_x000D_
<div_x000D_
onLoad = {this.runAfterRender}_x000D_
>_x000D_
//more stuff_x000D_
</div>_x000D_
)_x000D_
}
_x000D_
}