React-print-pdf is a new open-source library that simplifies PDF creation with React. You can design your PDFs like a website, integrate data from your database to your documents, and reuse community components and templates or build your own.
Created by three friends who were frustrated by existing solutions and wanted to make PDF creation easier for everyone. Now it’s yours. What are your thoughts on it ?!
- use a React SSG, obviously without client-side code
- use an existing "print to PDF" engine to render the resulting HTML+CSS
At first glance, this seems to be using JSX only. Ain't it possible to use JSX and fully static components without even using React? Is that what Astro is doing?
I'm a bit underinformed here, but it would be nice if the landing page would outline a bit more clearly what parts of React are used here and how (it also mentions fetching data dynamically to feed the components).
The PDFs hopefully don't contain JS interactivity and the data fetching is done at the top level of the component tree, before rendering the result to HTML (or does this skip HTML+CSS as an intermediate completely?), right?
The landing page looks great, would just love some more thorough explanation on what parts of React this uses and how.
Also, is there a JSX-based SSG that completely excludes client-side JS and is not made by Facebook? Would be interesting.
All that being said, it's truly interesting how much appeal JSX still has as a templating language focusing on JSON-serializable data structures, completely ignoring React's original value proposition of reactivity.