title: How to delay a react app from loading until a action is triggered?
body: <p>I am working on a web application project. The project consists of normal php web pages and an embedded react app. I have developed all the web pages and outsourced the react app section.</p>
  
  <p>I have put the react app in an iframe.  </p>
  
  <p>• I want to delay the react app from uploading until everything on my web page is loaded.</p>
  
  <p>This is because I am sending information in to the app via <code>iframe.contentWindow.postMessage()</code>. And I am using an eventlistener to get the information.</p>
  
  <p>The problem I am experiencing is that react is loaded before the event is triggered. So my react act keeps reading an undefined source. So I want to delay it from loading until after either the web page is loaded or after the event is triggered.</p>
  
  <p>• I cannot block the iframe from loading cause the <code>iframe.contentWindow.postMessage()</code> posts the information to the iframe on load.
  Can anyone show me how to delay the react app from loading until the post message is sent?</p>
  
  <p>Thanks in advance guys</p>