title: how to render pdf's dynamically in react?
body: <p>if I import the file I can render it but not dynamically from a path</p>
  
  <p>I have tried using both react-pdf, iframe. </p>
  
  <p>Below are working,</p>
  
  <pre><code> import pdf from './shared/B.pdf';
   &lt;Document file={pdf}&gt; &lt;Page pageNumber={1} /&gt; &lt;/Document&gt; 
   &lt;iframe src= {pdf}/&gt;
  </code></pre>
  
  <p>Below are not working,</p>
  
  <pre><code>&lt;Document file='./shared/B.pdf'&gt; &lt;Page pageNumber={1} /&gt; &lt;/Document&gt; 
  &lt;iframe src= './shared/B.pdf'/&gt;
  </code></pre>
  
  <p>I need it without import as I will get file path at runtime. Can anyone help?</p>