title: Each child in a list should have a unique "key" prop while rendering all pdf pages with PDF.JS
body: <p>I'm writing a wrapper on pdf.js in React. First, I load the pdf document with <code>getDocument()</code>, then I render each page with a dedicated component that creates a canvas and paints the pdf file (according to <code>pdf.js API</code>). Everything is working properly, the only issue is the error in the console:</p>
  
  <blockquote>
    <p>Each child in a list should have a unique "key" prop.</p>
  </blockquote>
  
  <p>What could be the key of each pdf page? There seems to be no unique key to a page.</p>
  
  <p>I tried <code>uniqueId()</code> of <code>lodash</code>; it did not work from some reason. I tried <code>new Date().getTime()</code>, and also tried giving each key the array index, but I get the same error.</p>
  
  <pre><code>{[...Array(this.state.numberOfPages)].map((_, page) =&gt; {
    return (
      &lt;div style={{ width: '100%' }}&gt;
     &lt;PdfRenderer 
  // im a component that does pdfDocument.getPage(currentPage)
       key={page}
       pdfDocument={this.state.pdfDocument}
       currentPage={page}
       scale={currentScale}
     /&gt;
    {this.renderLoading()}
  &lt;/div&gt;
  );
  })}
  </code></pre>