If we use the fetch method then it will open a new window for displaying the PDF file and let users download the PDF. But if you don’t want that then there is a way to do so. You can use the package called react-pdf, by using this package you can render the PDF in your React app by using the PDF URL.
**Prerequisites: **
React-pdf: It lets you display PDF in your React app as easily as if they were images. It helps to create custom components that you can use to create and structure your PDF documents.
#javascript #react-js #pdf #url