react-native-PDFView
react-native-PDFView copied to clipboard
Deprecated ViewPropTypes
Hi! 👋
In RN 0.69 ViewPropTypes are deprecated. https://github.com/facebook/react-native/commit/badd30885fb999124b6b54b3fb016edbd988c16b
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-view-pdf/lib/RNPDFView.js b/node_modules/react-native-view-pdf/lib/RNPDFView.js
index 99b0241..a6193ee 100644
--- a/node_modules/react-native-view-pdf/lib/RNPDFView.js
+++ b/node_modules/react-native-view-pdf/lib/RNPDFView.js
@@ -1,4 +1,5 @@
-import { requireNativeComponent, ViewPropTypes } from 'react-native';
+import { requireNativeComponent } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
import PropTypes from 'prop-types';
diff --git a/node_modules/react-native-view-pdf/lib/RNPDFView.js.flow b/node_modules/react-native-view-pdf/lib/RNPDFView.js.flow
index 99b0241..a6193ee 100644
--- a/node_modules/react-native-view-pdf/lib/RNPDFView.js.flow
+++ b/node_modules/react-native-view-pdf/lib/RNPDFView.js.flow
@@ -1,4 +1,5 @@
-import { requireNativeComponent, ViewPropTypes } from 'react-native';
+import { requireNativeComponent } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
import PropTypes from 'prop-types';
diff --git a/node_modules/react-native-view-pdf/package.json b/node_modules/react-native-view-pdf/package.json
index 9b38139..af43c8c 100644
--- a/node_modules/react-native-view-pdf/package.json
+++ b/node_modules/react-native-view-pdf/package.json
@@ -57,7 +57,9 @@
"ReactNativeViewPDF/*.h",
"ReactNativeViewPDF/*.m"
],
- "dependencies": {},
+ "dependencies": {
+ "deprecated-react-native-prop-types": "^2.3.0"
+ },
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/rumax/react-native-PDFView.git"
diff --git a/node_modules/react-native-view-pdf/src/RNPDFView.js b/node_modules/react-native-view-pdf/src/RNPDFView.js
index 99b0241..a6193ee 100644
--- a/node_modules/react-native-view-pdf/src/RNPDFView.js
+++ b/node_modules/react-native-view-pdf/src/RNPDFView.js
@@ -1,4 +1,5 @@
-import { requireNativeComponent, ViewPropTypes } from 'react-native';
+import { requireNativeComponent } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
import PropTypes from 'prop-types';
Any updates here, this breaks this library when using RN v0.69, I can add a PR to simply use deprecated package but I guess better solution would be to remove PropTypes
Will be fixed with migration to TS, https://github.com/rumax/react-native-PDFView/pull/230. For now you can ignore it, right?
Any timeline when fix will be Released ?
This is now a blocker when trying to upgrade react-native to 0.69 version. Is there any way to get a quick fix like the one proposed above?
Fixed in 0.14.0