rahul2104 / reactjs-pdf-reader

PDF Reader in browser for React js
MIT License
24 stars 11 forks source link

Any way to handle error loading pdf? #8

Open Gonzagv opened 3 years ago

Gonzagv commented 3 years ago

If for any reason the pdf reader cannot read a file is there any way to handle the error preventing it to crash the app?

bgeffrault commented 3 years ago

Hi Gonzagv, I don't use this library for now. But you can always add an error boundary around this component to limit the crash of the App to a specific area: https://reactjs.org/docs/error-boundaries.html