-
Notifications
You must be signed in to change notification settings - Fork 273
Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-swipeable@0.6.0 for the project I'm working on.
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..c2b18f9 100644
--- a/node_modules/react-native-swipeable/lib/index.js
+++ b/node_modules/react-native-swipeable/lib/index.js
@@ -75,10 +75,10 @@ var Swipeable = function (_PureComponent) {
pan.flattenOffset();
animationFn(pan, animationConfig).start(onDone);
- }, _this._unmounted = false, _this._handlePan = _reactNative.Animated.event([null, {
- dx: _this.state.pan.x,
- dy: _this.state.pan.y
- }]), _this._handleMoveShouldSetPanResponder = function (event, gestureState) {
+ }, _this._unmounted = false, _this._handlePan = _reactNative.Animated.event(
+ [null, { dx: _this.state.pan.x, dy: _this.state.pan.y }],
+ { useNativeDriver: false }
+ ), _this._handleMoveShouldSetPanResponder = function (event, gestureState) {
return Math.abs(gestureState.dx) > _this.props.swipeStartMinDistance;
}, _this._handlePanResponderStart = function (event, gestureState) {
var _this$state = _this.state,
@@ -294,8 +294,8 @@ var Swipeable = function (_PureComponent) {
}
_createClass(Swipeable, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
+ key: 'UNSAFE_componentWillMount',
+ value: function UNSAFE_componentWillMount() {
var _props = this.props,
onPanAnimatedValueRef = _props.onPanAnimatedValueRef,
onRef = _props.onRef;This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels