# Two instances of WebViewer were created on the same HTML element. Please create a new element for each instance of WebViewer

**URL:** <https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element-please-create-a-new-element-for-each-instance-of-webviewer/2571>\
**Category:** Technical Support\
**Created:** [May 11, 2023, 5:40am UTC](https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element-please-create-a-new-element-for-each-instance-of-webviewer/2571 "2023-05-11T05:40:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhilhill19](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@nikhilhill19](https://pdfjs.community/u/nikhilhill19)\
**Post date:** [May 11, 2023, 5:40am UTC](https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element-please-create-a-new-element-for-each-instance-of-webviewer/2571/1 "2023-05-11T05:40:50Z")

</div>

**Which product are you using?**

**PDF.js Express Version**

**Detailed description of issue**  
{Two instances of WebViewer were created on the same HTML element. I want only one instance.}

**Expected behaviour**  
{Only one instance of a webviewer should render}

**Does your issue happen with every document, or just one?**  
{Every pdf}

**Link to document**  
{Provide a link to the document in question if possible}  
[WebViewerModal.zip](https://pdfjs.community/uploads/short-url/nElJwVcDwDtETEUBOYq2vChR1fh.zip) (132 Bytes)

**Code snippet**  
{Attached a filet}

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [May 11, 2023, 4:21pm UTC](https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element-please-create-a-new-element-for-each-instance-of-webviewer/2571/2 "2023-05-11T16:21:56Z")

</div>

Hi nikhilhill19,

The zip file provided results in an empty JavaScript file.

However, there is a common scenario why this may happen, if you’re running a React application with Strict mode, the app technically renders each component twice. This isn’t a concern when you build your application, only when you’re developing, however, you can disable that. (If this is the case you’re seeing)

Best regards,  
Tyler
