Prettier the rest of ReactNative

Reviewed By: yungsters

Differential Revision: D7974340

fbshipit-source-id: 5fe457a8a9be4bd360fc3af9acb5c1136b2be0d7
This commit is contained in:
Eli White
2018-05-11 13:32:37 -07:00
committed by Facebook Github Bot
parent aba4ec0c09
commit 36fcbaa56d
170 changed files with 5132 additions and 3995 deletions
@@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
@@ -47,15 +48,24 @@ var getInitialState = function() {
};
var onScroll = function(e) {
ScrollListener.onScroll(e.nativeEvent.contentOffset.x, e.nativeEvent.contentOffset.y);
ScrollListener.onScroll(
e.nativeEvent.contentOffset.x,
e.nativeEvent.contentOffset.y,
);
};
var onScrollBeginDrag = function(e) {
ScrollListener.onScrollBeginDrag(e.nativeEvent.contentOffset.x, e.nativeEvent.contentOffset.y);
ScrollListener.onScrollBeginDrag(
e.nativeEvent.contentOffset.x,
e.nativeEvent.contentOffset.y,
);
};
var onScrollEndDrag = function(e) {
ScrollListener.onScrollEndDrag(e.nativeEvent.contentOffset.x, e.nativeEvent.contentOffset.y);
ScrollListener.onScrollEndDrag(
e.nativeEvent.contentOffset.x,
e.nativeEvent.contentOffset.y,
);
};
var onItemPress = function(itemNumber) {
@@ -78,11 +88,17 @@ var ScrollViewTestApp = createReactClass({
scrollViewApp = this;
var children = this.state.data.map((item, index) => (
<Item
key={index} text={item.text}
onPress={this.onItemPress.bind(this, index)} />
key={index}
text={item.text}
onPress={this.onItemPress.bind(this, index)}
/>
));
return (
<ScrollView onScroll={this.onScroll} onScrollBeginDrag={this.onScrollBeginDrag} onScrollEndDrag={this.onScrollEndDrag} ref="scrollView">
<ScrollView
onScroll={this.onScroll}
onScrollBeginDrag={this.onScrollBeginDrag}
onScrollEndDrag={this.onScrollEndDrag}
ref="scrollView">
{children}
</ScrollView>
);
@@ -103,8 +119,10 @@ var HorizontalScrollViewTestApp = createReactClass({
scrollViewApp = this;
var children = this.state.data.map((item, index) => (
<Item
key={index} text={item.text}
onPress={this.onItemPress.bind(this, index)} />
key={index}
text={item.text}
onPress={this.onItemPress.bind(this, index)}
/>
));
return (
<ScrollView horizontal={true} onScroll={this.onScroll} ref="scrollView">
@@ -136,7 +154,7 @@ var ScrollViewTestModule = {
BatchedBridge.registerCallableModule(
'ScrollViewTestModule',
ScrollViewTestModule
ScrollViewTestModule,
);
module.exports = ScrollViewTestModule;