title: How do I use iframe-resizer with a React JS Page As Content?
body: <p>I have a host webpage with an iframe. I also have a child page, to embed in the host's iframe, that is a React application. I want the height of the iframe to be adjusted automatically as the child page changes.</p>
  <p>I'm trying to use <a href="https://github.com/davidjbradshaw/iframe-resizer" rel="nofollow noreferrer">iframe-resizer</a> to resize the parent iframe. I know I need to include <a href="https://raw.github.com/davidjbradshaw/iframe-resizer/master/js/iframeResizer.contentWindow.min.js" rel="nofollow noreferrer">iframeResizer.contentWindow.min.js</a> in the child page (my react application). I don't know where in my child React project I need to set certain parameters/call functions and where I should import this JS file.</p>
  <p>I've tried following the instructions here and on certain tutorials online:
  <a href="https://github.com/davidjbradshaw/iframe-resizer" rel="nofollow noreferrer">https://github.com/davidjbradshaw/iframe-resizer</a></p>
  <p>But it's always just how to implement it on the host page.</p>
  <p>I already included the script in the host page:</p>
  <pre><code>&lt;iframe id=&quot;my-iframe&quot; src=&quot;https://myiframeurl.com&quot; width=&quot;100%&quot; frameBorder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;https://www.mycmsurl.com/IFrameResizer/Javascripts/iframeResizer.min.js&quot;&gt;
  &lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot;&gt; //&lt;![CDATA[
  jQuery('#my-iframe').iFrameResize({autoResize: true});
  //]]&gt;&lt;/script&gt;
  </code></pre>
  <p>How do I correctly include the iFrameResizer.ContentWindow in my child/embedded React project?</p>