You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using versions 1.8.3 and 2.0.0beta I got this error. It happens every time, when I unmount my component before onDocumentLoad is called. I don't want to use this.isMounted() because it's considered anti-pattern. So is there any way to unsubscribe from async actions in componentWillUnmount? I think it should be somewhere inside Document component
Hey, thanks for the report. I can confirm that this indeed is happening.
I could just set up flags which simulate isMounted on my own, but I'm not sure if we want that. I'd rather cancel a running task instead.
Sadly, it seems like the only way I can cancel a PDF.js task is to destroy it, which for some reason also happens to destroy worker altogether, which makes ReactPDF to fail to re-initialize when necessary. I don't know if I succeed at it alone, but any help is appreciated!
Using versions 1.8.3 and 2.0.0beta I got this error. It happens every time, when I unmount my component before
onDocumentLoad
is called. I don't want to usethis.isMounted()
because it's considered anti-pattern. So is there any way to unsubscribe from async actions incomponentWillUnmount
? I think it should be somewhere insideDocument
componentThe text was updated successfully, but these errors were encountered: