diegomura / diegomura/react-pdf
Uncaught TypeError: Eo is not a function with PDFDownloadLink [repro included]
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 1.3k
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 52
Description
**Describe the bug**
Using `` will crash with `Uncaught TypeError: Eo is not a function` as soon as as the `key` attribute of any node within `doc` changes.
**To Reproduce**
A minimal reproduction can be found at https://github.com/warrenfalk/react-pdf-issue-repro
1. git clone https://github.com/warrenfalk/react-pdf-issue-repro
2. cd react-pdf-issue-repro
3. pnpm install
4. pnpm run dev
5. Click the button
6. Page blanks because of error, open dev console to see the error
7. See src/App.tsx
This is due to the `key={count}`. If you remove this, the error goes away
Note: it would be easy to remove the `key` attribute in this repro of course, but it is not possible to remove it in rendering arrays and similar situations, of course, which is where we encountered this bug.
**Expected behavior**
It does not crash.
**Screenshots**

**Desktop (please complete the following information):**
- OS: Linux, (but seems to happen everywhere)
- Browser Chrome
- React-pdf version "@react-pdf/renderer": "^4.3.0"
- React 19
Contributor guide
Assessment
This issue has not been assessed yet.