What's new?
- React-PDF now have a set of unit tests to ensure quality and reliability (#125).
pageIndex
andpageNumber
props are now checked better. Now React-PDF will warn you when givenpageIndex
orpageNumber
that does not exist in a given file.- Minor performance optimizations when loading a page.
What's changed?
- Messages (loading, error, no data) are now rendered inside their component wrappers, not instead of them.
- React-PDF class names have been changed to ensure testability and easier styling. For more details, see Upgrade guide for React PDF 2.x users.
Bug fixes
- Fixed PageSVG not calling onRenderSuccess when rendered page.
- Fixed unmounting Page component throwing an error when page was not yet loaded.
- Fixed an issue that could have caused empty page callback in onLoadSuccess.
- Fixed getPageIndex returning pageIndex higher in priority than pageNumber, when given both.
- Fix onLoadSuccess calling onLoadSuccess before state with new pdf has been set, which could result in scripts relying on pdf's existence to fail if they fired too early.