0
PDF in react app
How can I add pdf files in my react app, so others can download it? Without a back-end or anything. Just like putting some pdf files in a folder inside "src" and users will be able to click on download and get the full pdf file downloaded.
2 Respuestas
+ 2
Put the pdf in the correct place and set react render with <PdfDownload/> component.
// react component
const PdfDownload = () =>
<a href='/fileabc.pdf' download>Click to download pdf file</a>
+ 1
So I just need jsx and write this simple html code? Never thought about it. Thanks