diff --git a/IntegrationTests/ReactContentSizeUpdateTest.js b/IntegrationTests/ReactContentSizeUpdateTest.js index fbec33a76a63b9..dbb34e7ff0a26c 100644 --- a/IntegrationTests/ReactContentSizeUpdateTest.js +++ b/IntegrationTests/ReactContentSizeUpdateTest.js @@ -14,7 +14,6 @@ const createReactClass = require('create-react-class'); const ReactNative = require('react-native'); const RCTNativeAppEventEmitter = require('RCTNativeAppEventEmitter'); const Subscribable = require('Subscribable'); -const TimerMixin = require('react-timer-mixin'); const {View} = ReactNative; @@ -27,7 +26,8 @@ const newReactViewHeight = 202; const ReactContentSizeUpdateTest = createReactClass({ displayName: 'ReactContentSizeUpdateTest', - mixins: [Subscribable.Mixin, TimerMixin], + mixins: [Subscribable.Mixin], + _timeoutID: (null: ?TimeoutID), UNSAFE_componentWillMount: function() { this.addListenerOn( @@ -52,11 +52,17 @@ const ReactContentSizeUpdateTest = createReactClass({ }, componentDidMount: function() { - this.setTimeout(() => { + this._timeoutID = setTimeout(() => { this.updateViewSize(); }, 1000); }, + componentWillUnmount: function() { + if (this._timeoutID != null) { + clearTimeout(this._timeoutID); + } + }, + rootViewDidChangeIntrinsicSize: function(intrinsicSize) { if ( intrinsicSize.height === newReactViewHeight &&