I'm trying to use the package react-pdf.
const SummaryTable = () => (
<Document>
<Page size="A4" style={styles.page}>
<Typography> Test</Typography>
</Page>
</Document>
);
return (
<>
<PDFDownloadLink document={<SummaryTable />} fileName="somename.pdf">
{({ blob, url, loading, error }) =>
loading ? "Loading document..." : "Download now!"
}
</PDFDownloadLink>
<SummaryTable />
</>
);
Here's my package.json :
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.13.4",
"@react-pdf/renderer": "^3.1.12",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"firebase": "^9.22.1",
"papaparse": "^5.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-firebase-hooks": "^5.1.1",
"react-router-dom": "^6.12.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
When i try to display this page, i have dispatcher.useInsertionEffect is not a function
The solution in the previous SO threads doesn't work, i'm already on react and react-dom 18.2.