Remove fbjs/lib/emptyFunction from react-native

Summary: This removes `emptyFunction` usage from react-native.

Reviewed By: yungsters

Differential Revision: D13138187

fbshipit-source-id: eaa327884aac2cabb99024077e3407cb99c946d2
This commit is contained in:
Christoph Nakazawa
2018-11-26 06:24:05 -08:00
committed by Facebook Github Bot
parent 2de01cb54d
commit cfef04e760
3 changed files with 11 additions and 11 deletions

View File

@@ -26,7 +26,6 @@ const TouchableWithoutFeedback = require('TouchableWithoutFeedback');
const UIManager = require('UIManager');
const createReactClass = require('create-react-class');
const emptyFunction = require('fbjs/lib/emptyFunction');
const invariant = require('fbjs/lib/invariant');
const requireNativeComponent = require('requireNativeComponent');
const warning = require('fbjs/lib/warning');
@@ -276,6 +275,8 @@ type Props = $ReadOnly<{|
contextMenuHidden?: ?boolean,
|}>;
const emptyFunctionThatReturnsTrue = () => true;
/**
* A foundational component for inputting text into the app via a
* keyboard. Props provide configurability for several features, such as
@@ -999,7 +1000,7 @@ const TextInput = createReactClass({
onBlur={this._onBlur}
onChange={this._onChange}
onSelectionChange={this._onSelectionChange}
onSelectionChangeShouldSetResponder={emptyFunction.thatReturnsTrue}
onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
text={this._getText()}
/>
);
@@ -1036,7 +1037,7 @@ const TextInput = createReactClass({
onContentSizeChange={this.props.onContentSizeChange}
onSelectionChange={this._onSelectionChange}
onTextInput={this._onTextInput}
onSelectionChangeShouldSetResponder={emptyFunction.thatReturnsTrue}
onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
text={this._getText()}
dataDetectorTypes={this.props.dataDetectorTypes}
onScroll={this._onScroll}
@@ -1089,7 +1090,7 @@ const TextInput = createReactClass({
onContentSizeChange={this.props.onContentSizeChange}
onSelectionChange={this._onSelectionChange}
onTextInput={this._onTextInput}
onSelectionChangeShouldSetResponder={emptyFunction.thatReturnsTrue}
onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
text={this._getText()}
dataDetectorTypes={this.props.dataDetectorTypes}
onScroll={this._onScroll}