- tried to view large files. Didn't face any issues but takes a huge amount of memory or CPU usage to view the file.
- the solution is to lazy load or load only those pages that need to be viewed. luckily there are some suggestions found from
react-pdf
samples and issues. Links are below.
- outdated sample(but readme updated): https://github.com/michaeldzjap/react-pdf-sample
- React-window to rendering any large lists which also fixes the large pdf pages issue: https://github.com/bvaughn/react-window
- related issue: wojtekmaj/react-pdf#94
- the solution from the repo owner in the issue: wojtekmaj/react-pdf#94 (comment)
- example with react-window and infinite loader: