Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for react native version 0.69+ #200

Open
rossicler-hostalky opened this issue Aug 17, 2022 · 0 comments
Open

Fix for react native version 0.69+ #200

rossicler-hostalky opened this issue Aug 17, 2022 · 0 comments

Comments

@rossicler-hostalky
Copy link

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.

After updating react native version to 0.69, they removed PropTypes from react-native, because of that there was breaking changes, since this package was using that. The changes was simply updating imports from "react-native" to ""deprecated-react-native-prop-types".

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-slider/lib/Slider.js b/node_modules/react-native-slider/lib/Slider.js
index c640410..83003ce 100644
--- a/node_modules/react-native-slider/lib/Slider.js
+++ b/node_modules/react-native-slider/lib/Slider.js
@@ -5,6 +5,7 @@ var _react=require("react");var _react2=_interopRequireDefault(_react);
 
 
 var _reactNative=require("react-native");
+var _reactNativePropTypes=require("deprecated-react-native-prop-types");
 
 
 
@@ -555,7 +556,7 @@ return false;}}]);return Slider;}(_react.PureComponent);Slider.propTypes={ /**
      * The style applied to the thumb.
      */thumbStyle:_reactNative.ViewPropTypes.style, /**
      * Sets an image for the thumb.
-     */thumbImage:_reactNative.Image.propTypes.source, /**
+     */thumbImage:_reactNativePropTypes.ImagePropTypes.source, /**
      * Set this to true to visually see the thumb touch rect in green.
      */debugTouchArea:_propTypes2.default.bool, /**
      * Set to true to animate values with default 'timing' animation type
diff --git a/node_modules/react-native-slider/src/Slider.js b/node_modules/react-native-slider/src/Slider.js
index 37deee5..45e6506 100644
--- a/node_modules/react-native-slider/src/Slider.js
+++ b/node_modules/react-native-slider/src/Slider.js
@@ -11,8 +11,8 @@ import {
   PanResponder,
   View,
   Easing,
-  ViewPropTypes
 } from "react-native";
+import { ViewPropTypes, ImagePropTypes } from "deprecated-react-native-prop-types";
 
 import PropTypes from 'prop-types';
 
@@ -146,7 +146,7 @@ export default class Slider extends PureComponent {
     /**
      * Sets an image for the thumb.
      */
-    thumbImage: Image.propTypes.source,
+    thumbImage: ImagePropTypes.source,
 
     /**
      * Set this to true to visually see the thumb touch rect in green.

This issue body was partially generated by patch-package.

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

No branches or pull requests

1 participant