react-pdf
react-pdf copied to clipboard
Non-deterministic `Document` IDs on subsequent renders
Describe the bug
I encountered an issue with non-deterministic document IDs when trying to write a few snapshot test cases for a project I was working on. I tried setting every prop for both <Document /> (incl. creationDate and modificationDate) and <Page />. The document's ID is still different on every render.
To Reproduce
Try to render any document twice with any content and compare the raw outputs. You will find that the /ID line (e.g. /ID [<a072362df31f6eb25904f2f2fc2166d8> <a072362df31f6eb25904f2f2fc2166d8>]) differs on subsequent renders.
Expected behavior I would expect the ID to stay the same given the same props.
Desktop:
- OS: macOS
react-pdfversion: 3.4.4