From 6b8bb0e464ca83c4175dbf5422f8b9ead4629c0a Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Tue, 5 Jul 2016 13:14:35 +0200 Subject: [PATCH] Extract props Fixes warning in 15.2.0 --- src/Swipeable.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Swipeable.js b/src/Swipeable.js index 0a2cbae0..75df72f8 100644 --- a/src/Swipeable.js +++ b/src/Swipeable.js @@ -151,15 +151,34 @@ const Swipeable = React.createClass({ }, render: function () { + const { + children, + nodeName, + onSwiped, + onSwiping, + onSwipingUp, + onSwipingRight, + onSwipingDown, + onSwipingLeft, + onSwipedUp, + onSwipedRight, + onSwipedDown, + onSwipedLeft, + flickThreshold, + delta, + preventDefaultTouchmoveEvent, + ... otherProps + } = this.props; + return React.createElement( - this.props.nodeName, + nodeName, { - ...this.props, + ...otherProps, onTouchStart: this.touchStart, onTouchMove: this.touchMove, onTouchEnd: this.touchEnd, }, - this.props.children + children ); } })