Change import to avoid ViewPropTypes error on build
jacobira opened this issue Β· comments
Jacob Baldwin commented
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch react-native-camera@4.2.1
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-camera/src/RNCamera.js b/node_modules/react-native-camera/src/RNCamera.js
index b7a271a..649e602 100644
--- a/node_modules/react-native-camera/src/RNCamera.js
+++ b/node_modules/react-native-camera/src/RNCamera.js
@@ -5,7 +5,6 @@ import {
findNodeHandle,
Platform,
NativeModules,
- ViewPropTypes,
requireNativeComponent,
View,
ActivityIndicator,
@@ -14,6 +13,8 @@ import {
PermissionsAndroid,
} from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
+
import type { FaceFeature } from './FaceDetector';
const Rationale = PropTypes.shape({
This issue body was partially generated by patch-package.