Re Rerendering WebViewer

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
I’m having trouble with maintaing a webViewer amongst conditional components. What is the best strategy for initializing and preserving / reinitiliazing the webViewer.

When the conditional selected document is true for the 2nd time after being false, it does not reload the webviewer in the DOM.

  {selectedDocument && <DocumentComponent/>

<DocumentComponent>   // Renders full screen
       <WebViewerDiv/> // This initializes the webviewer.

Hi there,

Re-initializing WebViewer is not recommended. Please see our guide here:

We recommend you to keep the existing instance and use loadDocument to reload documents instead.

Best regards,
Kevin Kim