github diegomura/react-pdf @react-pdf/renderer@3.1.12

latest releases: @react-pdf/types@2.5.0, @react-pdf/stylesheet@4.2.5, @react-pdf/renderer@3.4.4...
11 months ago

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}</>;
    };

Don't miss a new react-pdf release

NewReleases is sending notifications on new releases.