Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

ViewPropTypes has been removed from React Native #3427

Open
kris1803 opened this issue Aug 8, 2022 · 6 comments
Open

ViewPropTypes has been removed from React Native #3427

kris1803 opened this issue Aug 8, 2022 · 6 comments

Comments

@kris1803
Copy link

kris1803 commented Aug 8, 2022

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch [email protected] for the project I'm working on.

It talks about deprecated ViewPropTypes in 0.69 React native, they have even been removed from React Native so the app cannot start.

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..6dd3123 100644
--- a/node_modules/react-native-camera/src/RNCamera.js
+++ b/node_modules/react-native-camera/src/RNCamera.js
@@ -1,11 +1,11 @@
 // @flow
 import React from 'react';
 import PropTypes from 'prop-types';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 import {
   findNodeHandle,
   Platform,
   NativeModules,
-  ViewPropTypes,
   requireNativeComponent,
   View,
   ActivityIndicator,

This issue body was partially generated by patch-package.

@kris1803 kris1803 changed the title Remov ViewPropTypes has been removed from React Native Aug 8, 2022
@DanielGBullido
Copy link

please include this in next version!

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch [email protected] for the project I'm working on.

It talks about deprecated ViewPropTypes in 0.69 React native, they have even been removed from React Native so the app cannot start.

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..6dd3123 100644
--- a/node_modules/react-native-camera/src/RNCamera.js
+++ b/node_modules/react-native-camera/src/RNCamera.js
@@ -1,11 +1,11 @@
 // @flow
 import React from 'react';
 import PropTypes from 'prop-types';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 import {
   findNodeHandle,
   Platform,
   NativeModules,
-  ViewPropTypes,
   requireNativeComponent,
   View,
   ActivityIndicator,

This issue body was partially generated by patch-package.

@kris1803
Copy link
Author

Is someone maintaining it?

@wojtekmaj
Copy link

@azizmobarak
Copy link

opened a pull request #3442

@bearsworth
Copy link

I have followed and applied the fix but now I get a unhandled promise rejection now...did this occur or what RN version are you using?

@azizmobarak
Copy link

@bearsworth if you are using RN >67 then go to build.gradle under app folder you will find a line
missingDimensionStrategy 'react-native-camera', 'general' change general to mlkit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants