Permalink
Browse files

fix warnings in create view

Reviewed By: fred2028

Differential Revision: D5016368

fbshipit-source-id: 60fae5769f66bf94de6fa2fe75a509862270c401
  • Loading branch information...
zjj010104 authored and facebook-github-bot committed May 8, 2017
1 parent 8e6bde3 commit bd004568d3e006b61391417fc405e9483996dc81
Showing with 8 additions and 2 deletions.
  1. +8 −2 Libraries/Components/Touchable/TouchableHighlight.js
@@ -15,8 +15,8 @@
var ColorPropType = require('ColorPropType');
var NativeMethodsMixin = require('NativeMethodsMixin');
var React = require('React');
const PropTypes = require('prop-types');
var React = require('React');
var ReactNativeViewAttributes = require('ReactNativeViewAttributes');
var StyleSheet = require('StyleSheet');
var TimerMixin = require('react-timer-mixin');
@@ -137,16 +137,22 @@ var TouchableHighlight = React.createClass({
},
getInitialState: function() {
this._isMounted = false;
return merge(
this.touchableGetInitialState(), this._computeSyntheticState(this.props)
);
},
componentDidMount: function() {
this._isMounted = true;
ensurePositiveDelayProps(this.props);
ensureComponentIsNative(this.refs[CHILD_REF]);
},
componentWillMount: function() {
this._isMounted = false;
},
componentDidUpdate: function() {
ensureComponentIsNative(this.refs[CHILD_REF]);
},
@@ -216,7 +222,7 @@ var TouchableHighlight = React.createClass({
},
_showUnderlay: function() {
if (!this.isMounted() || !this._hasPressHandler()) {
if (!this._isMounted || !this._hasPressHandler()) {
return;
}

0 comments on commit bd00456

Please sign in to comment.