-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Error in PDFDownloadLink with React-PDF v4 #2886
Comments
Same thing here, any fix? |
…nent with react-pdf v4
Yes, I have already created PR #2888. |
I have the same error, in local development build it works, but not on production, this used to work... I'm on version 3.4.4 |
It seems like you're experiencing a production issue with version 3.4.4 of
|
I, too, am having the same problem. |
Fixed for me when I upgraded to v4 and downgraded back to 3.4.4 (3.4.5 also was bugged) |
I have the same issue using |
Not sure if this is related to this, but if you are usingNextjs and have some errors after upgrading you can move everything that uses this package into its own component and then import it into another component using: import dynamic from 'next/dynamic'; |
The error will probably continue to appear within the own component |
After upgrading to version 4, a TypeScript issue occurred with <PDFDownloadLink>. Downgrading the library resolved the issue as described this issue: diegomura/react-pdf#2886 (comment).
I'm not too experienced with nodejs, could you please explain how to temporary fix this? |
Add this |
Depends what the error is. In my case it is only the SSR part that caused the issue. So disabling SSR for the client leaf fixed it, with no errors inside the component. |
Describe the bug
After updating to react-pdf v4, I encountered a TypeScript error when using the PDFDownloadLink component. The error occurs when passing a render prop to PDFDownloadLink, specifically when destructuring the BlobProviderParams.
The following TypeScript error is shown:
To Reproduce
Expected behavior
The PDFDownloadLink component should work as expected and correctly handle the render prop with the BlobProviderParams state, without any TypeScript errors.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: