Migration to 6.0
6.0.0 is a breaking release.
High-impact changes
- Viewer component is
PdfView. - Page indexing is 0-based across viewer and document APIs.
- Downloads/caching moved to native
PdfCache. - Errors are structured (
PdfErrorwith stablecode).
Dependency updates
Remove old dependency usage unless your app directly uses it:
npm uninstall react-native-blob-util @react-native-async-storage/async-storage crypto-js
Install required peer:
npm install react-native-pdf-jsi react-native-nitro-modules
Viewer migration map
| 5.x / 4.x | 6.0 |
|---|---|
page (1-based) | initialPage + goToPage (0-based) |
scale | initialScale + zoomTo |
onLoadComplete | onLoad |
onPageChanged | onPageChange |
highlightRects string rect | highlights object rect |
Password handling
Use onPasswordRequired and pass password prop updates as needed.
Full details
Canonical migration reference in source repo: