This library is react specific implementation of pdf.js that lets you render pdf in your react application whether it is web or mobile.
npm install new-react-pdf
Note: copy the pdf.worker.mjs
file to your public folder from the node_modules/pdfjs-dist/build/
folder.
windows: copy node_modules/pdfjs-dist/build/pdf.worker.mjs public/
linux/unix/mac: cp node_modules/pdfjs-dist/build/pdf.worker.mjs public/