I am not sure what i am doing wrong since i followed the guide for react-pdf to the point.I believe I am not importing the pdf in the right way because I dont see anythign in my app. here is the code
import { Document, Page } from 'react-pdf';
import example from '../../assets/example.pdf';
onDocumentLoad = ({ numPages }) => {
this.setState({ numPages });
}
render() {
const { classes } = this.props;
const { pageNumber, numPages ,example } = this.state;
return (
<Document
file={example}
onLoadSuccess={this.onDocumentLoad}
>
<Page pageNumber={pageNumber} />
</Document>
<p>Page {pageNumber} of {numPages}</p>