Open Jussinevavuori opened 4 days ago
Update, for anyone struggling with the same React Reconciler issues in a monorepo as I did.
Patching a library didn't produce the wanted results: Initially, I thought that React was only imported by @react-pdf/reconciler/lib/index.js
to check the version, however, the reconciler itself also depends on React. The patches described in 1. and 3. will cause react-pdf to apply Reconciler 0.31 for React 19 while importing React 18 (or below). This will -- to my great surprise -- not work.
Instead, installing React 19 at the root of my monorepo (and ensuring all versions were correct) fixed the issue. This works for me, as I know that I will only ever need react-pdf with React 19, no React 18 implementation needs to call react-pdf.
Is your feature request related to a problem? Please describe. Upgrade documentation on compatability in docs. Add information on React 19 support since
4.1.0.
Describe the solution you'd like Extend documentation on compatibility.
Describe alternatives you've considered None.
Additional context Add information that the React 19 compatibility works by automatically detecting your version based on
React.version
. This might be especially important for monorepos, see below on why.Thank you! You have done great work with the React 19 compatability, I appreciate it very much.