Improvements
- Lazy load the document. The PDF document will be loaded if the viewer container is visible in the viewport.
Bug fixes
Fix a bug that could happen when we load multiple documents by changing fileUrl
.
In that case, you may see the error message
Worker was destroyed
Cannot read property 'sendWithPromise' of null
This version also fixes a potential memory leaks reported by React DevTools when we try to load new document even if the current document isn't rendered completely.