Skip to content

Commit 5c4ace0

Browse files
author
Gianmarco Leone
committed
Using this.setTimeout and console.log elimination
As documented in https://facebook.github.io/react-native/docs/timers.html, using this.setTimeout
1 parent f5bcf9f commit 5c4ace0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ const ScrollableTabView = React.createClass({
6565
},
6666

6767
componentDidMount() {
68-
setTimeout(() => {
68+
this.setTimeout(() => {
6969
if (this.scrollView && Platform.OS === 'android') {
70-
console.log("Scrolling to " + this.props.initialPage + " with containerWidth " + this.state.containerWidth);
7170
const x = this.props.initialPage * this.state.containerWidth;
7271
this.scrollView.scrollTo({ x, animated: false });
7372
}

0 commit comments

Comments
 (0)