Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
Problem with react-pdf library, when using usePDF hook

I use usePDF hook to download rendered pdf file, and it works correctly, but when i move to another page and come back to pdf page, button stops working. I check instance after returning from another page and blob file in it becomes null

const [instance, updateInstance] = usePDF({ document: ShowPdf() }) // ShowPdf is a function that returns <document>...pdf content</document>

How can I fix this problem? My library https://react-pdf.org/

This is my instance before moving to another page/component enter image description here

This is after returning from another page/component enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Instantiating component as JSX component worked for me -

const [instance, updateInstance] = usePDF({ document: <ShowPdf/> })
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!