Skip to content

@react-pdf/renderer@3.1.12

Compare
Choose a tag to compare
@github-actions github-actions released this 09 Jun 08:14
· 107 commits to master since this release
a37d927

Patch Changes

  • #2247 6d408c8 Thanks @jeetiss! - ### updates for usePDF hook

    update function takes the new document and renders it:

    const PdfView = () => {
      const [pdf, update] = usePdf();
    
      useEffect(() => {
        update(<PDFDocument />);
      }, []);
    
      if (pdf.loading) return null;
    
      // use your PDF here
      return <>{pdf.url}</>;
    };