rn-range-slider icon indicating copy to clipboard operation
rn-range-slider copied to clipboard

ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

Open yao-charlie opened this issue 3 years ago • 1 comments

In title. Updated a bunch of my dependencies and it seems this will be deprecated from RN soon.

P.S. not a regular dev so I apologize if this isn't a standard/polite way of advising of a potential issue :)

yao-charlie avatar Jun 20 '22 00:06 yao-charlie

Ran into the same issue after an update to "react-native": "0.69.1".

Now it is no longer a warning but an error:

ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

Workaround until this is fixed: https://stackoverflow.com/a/72836507/1746379

ptreitler avatar Jul 04 '22 12:07 ptreitler

Ran into the same issue after an update to "react-native": "0.69.1".

Now it is no longer a warning but an error:

ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

Workaround until this is fixed: https://stackoverflow.com/a/72836507/1746379

mine too

gregoriusjimmy avatar Sep 02 '22 02:09 gregoriusjimmy

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

Here is the diff that solved my problem:

diff --git a/node_modules/rn-range-slider/index.js b/node_modules/rn-range-slider/index.js
index c054f07..c124ecc 100644
--- a/node_modules/rn-range-slider/index.js
+++ b/node_modules/rn-range-slider/index.js
@@ -1,5 +1,6 @@
 import React, { memo, useState, useEffect, useCallback, useMemo, useRef } from 'react';
-import { Animated, PanResponder, View, ViewPropTypes } from 'react-native';
+import { Animated, PanResponder, View } from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
 import PropTypes from 'prop-types';
 
 import styles from './styles';

fahad86 avatar Sep 08 '22 04:09 fahad86

Fixed this in 2.2.1

githuboftigran avatar Sep 13 '22 08:09 githuboftigran