react-native-masked-view/masked-view

RN 0.68 and ViewPropTypes deprecation

Closed this issue ยท 4 comments

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch @react-native-masked-view/masked-view@0.2.6 for the project I'm working on.

It is related to version 0.68 of react-native where the ViewPropTypes import was deprecated.

Here is the diff that solved my problem:

diff --git a/node_modules/@react-native-masked-view/masked-view/js/MaskedViewTypes.js b/node_modules/@react-native-masked-view/masked-view/js/MaskedViewTypes.js
index 610e54d..1daced9 100644
--- a/node_modules/@react-native-masked-view/masked-view/js/MaskedViewTypes.js
+++ b/node_modules/@react-native-masked-view/masked-view/js/MaskedViewTypes.js
@@ -1,6 +1,6 @@
 // @flow
 import { type Node, type Element } from 'react';
-import { ViewPropTypes } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types'
 
 export type MaskedViewProps = typeof ViewPropTypes &
   $ReadOnly<{|

This issue body was partially generated by patch-package.

Was this deployed? Still getting the deprecation warning for ViewPropTypes being imported from React Native - not deprecated-react-native-prop-types.
Please fix this!!

@jakrim may I ask what version of masked-view you're using? It should be fixed in v0.2.7

disrae commented

I'm not sure why the latest version that comes up is not 0.2
image
And when I try to force the version, they are not recognized:
image
Edit: Oh the package name changed to: @react-native-masked-view/masked-view

the package has been renamed to @react-native-masked-view/masked-view, sorry for the confusion