Skip to content

Update ViewPropTypes because it's deprecated in the recent React Native version#131

Open
foolem wants to merge 2 commits into
jshanson7:masterfrom
foolem:master
Open

Update ViewPropTypes because it's deprecated in the recent React Native version#131
foolem wants to merge 2 commits into
jshanson7:masterfrom
foolem:master

Conversation

@foolem

@foolem foolem commented Aug 26, 2022

Copy link
Copy Markdown

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-swipeable/lib/index.js b/node_modules/react-native-swipeable/lib/index.js
index 57996ad..7242753 100644
--- a/node_modules/react-native-swipeable/lib/index.js
+++ b/node_modules/react-native-swipeable/lib/index.js
@@ -16,6 +16,8 @@ var _reactNative = require('react-native');
 
 var _propTypes = require('prop-types');
 
+var _deprecatedPropTypes = require('deprecated-react-native-prop-types');
+
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
@@ -603,12 +605,12 @@ Swipeable.propTypes = {
   swipeStartMinDistance: _propTypes.PropTypes.number,
 
   // styles
-  style: _reactNative.ViewPropTypes.style,
-  leftContainerStyle: _reactNative.ViewPropTypes.style,
-  leftButtonContainerStyle: _reactNative.ViewPropTypes.style,
-  rightContainerStyle: _reactNative.ViewPropTypes.style,
-  rightButtonContainerStyle: _reactNative.ViewPropTypes.style,
-  contentContainerStyle: _reactNative.ViewPropTypes.style
+  style: _deprecatedPropTypes.ViewPropTypes.style,
+  leftContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  leftButtonContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  rightContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  rightButtonContainerStyle: _deprecatedPropTypes.ViewPropTypes.style,
+  contentContainerStyle: _deprecatedPropTypes.ViewPropTypes.style
 };
 Swipeable.defaultProps = {
   leftContent: null,

@zedtux

zedtux commented Nov 18, 2022

Copy link
Copy Markdown

@jshanson7 any chance you merge this PR and release a new version of your package 🙏 ?

@zedtux

zedtux commented Nov 18, 2022

Copy link
Copy Markdown

God save patch-package 🌟

@cglacet

cglacet commented Nov 30, 2022

Copy link
Copy Markdown

I think this repo has no active maintainer, maybe we should use this instead : react-native-gesture-handler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants