Skip to content

Commit

Permalink
Remove TimerMixin on ReactContentSizeUpdateTest (#21502)
Browse files Browse the repository at this point in the history
Summary:
Related to #21485.
Removed `TimerMixin` from `ReactContentSizeUpdateTest`.
Pull Request resolved: #21502

Reviewed By: TheSavior

Differential Revision: D10218548

Pulled By: RSNara

fbshipit-source-id: 9a0642e14f8548d8dc9683f0f70353416ed04ae0
  • Loading branch information
peaonunes authored and facebook-github-bot committed Oct 5, 2018
1 parent 6c20017 commit 4d69431
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions IntegrationTests/ReactContentSizeUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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(
Expand All @@ -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 &&
Expand Down

0 comments on commit 4d69431

Please sign in to comment.