This post will explain you how to show pdf files in React JS using a package called react pdf
react pdf is an open source package created by developers to help the community. The primary purpose of this package is to show pdf files.
In order to download this package, you can go to this website and follow the simple instructions give there.
To install run this.
npm i react pdf
Here's an example of basic usage to display all pages from pdf
Note: If you are following official documentation you may write the code like below ,but you may get only single page by using below code.