I'm calling a function in React within componentDidMount that queries the DOM however the DOM isn't rendered in time even though i'm calling it after componentDidMount.
The strange thing is that in webpack it all works fine and the DOM is rendered and ready for my querySelectorAll. However when built it isn't. I've tried on multiple server types and its always the same.
My initial thoughts are that minifying the code is messing it up somehow.
I only require the function to run once so that's why i placed it in component did mount