mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Remove TimerMixin on ReactContentSizeUpdateTest (#21502)
Summary: Related to #21485. Removed `TimerMixin` from `ReactContentSizeUpdateTest`. Pull Request resolved: https://github.com/facebook/react-native/pull/21502 Reviewed By: TheSavior Differential Revision: D10218548 Pulled By: RSNara fbshipit-source-id: 9a0642e14f8548d8dc9683f0f70353416ed04ae0
This commit is contained in:
committed by
Facebook Github Bot
parent
6c20017152
commit
4d6943168b
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user