From 2c0e3e97dfd10f48daf3710a73273edf2891206e Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Mon, 6 Apr 2015 08:42:58 -0700 Subject: [PATCH] [ReactNative] Revert D1965911 --- .../Touchable/TouchableWithoutFeedback.js | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/Libraries/Components/Touchable/TouchableWithoutFeedback.js b/Libraries/Components/Touchable/TouchableWithoutFeedback.js index 8efa61c93..cd9ea02fd 100755 --- a/Libraries/Components/Touchable/TouchableWithoutFeedback.js +++ b/Libraries/Components/Touchable/TouchableWithoutFeedback.js @@ -13,10 +13,7 @@ var React = require('React'); var Touchable = require('Touchable'); -var keyOf = require('keyOf'); var onlyChild = require('onlyChild'); -var cloneWithProps = require('cloneWithProps'); -var ensureComponentIsNative = require('ensureComponentIsNative'); /** * When the scroll view is disabled, this defines how far your touch may move @@ -51,14 +48,6 @@ var TouchableWithoutFeedback = React.createClass({ return this.touchableGetInitialState(); }, - componentDidMount: function() { - ensureComponentIsNative(this.refs[CHILD_REF]); - }, - - componentDidUpdate: function() { - ensureComponentIsNative(this.refs[CHILD_REF]); - }, - /** * `Touchable.Mixin` self callbacks. The mixin will invoke these if they are * defined on your component. @@ -88,17 +77,8 @@ var TouchableWithoutFeedback = React.createClass({ }, render: function(): ReactElement { - var child = cloneWithProps( - onlyChild(this.props.children), - { - ref: CHILD_REF, - accessible: true, - testID: this.props.testID, - } - ); - // Note(avik): remove dynamic typecast once Flow has been upgraded - return (React: any).cloneElement(child, { + return (React: any).cloneElement(onlyChild(this.props.children), { accessible: true, testID: this.props.testID, onStartShouldSetResponder: this.touchableHandleStartShouldSetResponder, @@ -111,6 +91,4 @@ var TouchableWithoutFeedback = React.createClass({ } }); -var CHILD_REF = keyOf({childRef: null}); - module.exports = TouchableWithoutFeedback;