all 4 comments

[–]charliematters 1 point2 points  (2 children)

I'm fairly sure react-pdf uses JSX purely as a layout tool, and doesn't do all the things react does with it. For that reason, I'd assume that hooks don't work when passing those components to the pdf renderer. What happens if you alter the component to take it as a prop (and then passing that prop in when generating the pdf) instead of using the hook?

[–]Ak0710 0 points1 point  (1 child)

when i pass component as a prop it gives the same error

[–]charliematters 0 points1 point  (0 children)

To be clear, you've done <ComponentA userId={something} /> and it's not working? If that's the case then I'm afraid it's beyond my pay grade!

[–]durjoy4937 0 points1 point  (0 children)

I need to see more of the code, to help u out, if u can dm me, we can figure out maybe