# Two instances of WebViewer were created on the same HTML element

**URL:** <https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element/2806>\
**Category:** Technical Support\
**Created:** [August 24, 2023, 12:02am UTC](https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element/2806 "2023-08-24T00:02:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user67](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/user67/32/676_2.png) [@user67](https://pdfjs.community/u/user67)\
**Post date:** [August 24, 2023, 12:02am UTC](https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element/2806/1 "2023-08-24T00:02:22Z")

</div>

**Which product are you using?**  
PDF.js Express Viewer

**PDF.js Express Version**  
8.7.4

**Detailed description of issue**  
An error telling me that it connot render the component twice on the same html element.

As I’m following the simple setup for the react integration, I think this doesn’t need any code snippet.

All I’m doing basically is following the setup of the documentation, the only thing that might be different is the fact that I have Strict Mode enabled.

---

<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:** [August 24, 2023, 8:17pm UTC](https://pdfjs.community/t/two-instances-of-webviewer-were-created-on-the-same-html-element/2806/2 "2023-08-24T20:17:57Z")

</div>

Hello user67,

React Strict mode renders the application twice, so it makes sense that the application would have this error.

You can read more about it here along with a potential solution: [https://github.com/facebook/react/issues/24502](https://github.com/facebook/react/issues/24502)

Basically, you need to clean up anything that has been instantiated before the application has rerendered.

Best regards,  
Tyler
