mikecousins/react-pdf-js

Using setState in the onLoadSuccess method causes the file to be accessed repeatedly

Closed this issue · 1 comments

Using setState in the onLoadSuccess method causes the file to be accessed repeatedly.
What's causing my constant stress?Have you ever had this problem?
The way I use it:

<Document
file={{
url: filePath,
withCredentials: true
}}
onLoadSuccess={this.onLoadSuccess}
>

I think we'll need to see a bit more of your code. Can you setup a codepen and open this again if you're still having issues?