10
10
11
11
'use strict' ;
12
12
13
- var React = require ( 'react' ) ;
14
- var createReactClass = require ( 'create-react-class' ) ;
15
- var ReactNative = require ( 'react-native' ) ;
16
- var { Image, LayoutAnimation, StyleSheet, Text, View} = ReactNative ;
17
- var { TestModule} = ReactNative . NativeModules ;
13
+ const React = require ( 'react' ) ;
14
+ const createReactClass = require ( 'create-react-class' ) ;
15
+ const ReactNative = require ( 'react-native' ) ;
16
+ const { Image, LayoutAnimation, StyleSheet, Text, View} = ReactNative ;
17
+ const { TestModule} = ReactNative . NativeModules ;
18
18
19
- var deepDiffer = require ( 'deepDiffer' ) ;
19
+ const deepDiffer = require ( 'deepDiffer' ) ;
20
20
21
21
function debug ( ...args ) {
22
22
// console.log.apply(null, arguments);
@@ -42,7 +42,7 @@ type State = {
42
42
containerStyle ?: Style ,
43
43
} ;
44
44
45
- var LayoutEventsTest = createReactClass ( {
45
+ const LayoutEventsTest = createReactClass ( {
46
46
displayName : 'LayoutEventsTest' ,
47
47
getInitialState ( ) : State {
48
48
return {
@@ -93,7 +93,7 @@ var LayoutEventsTest = createReactClass({
93
93
} ,
94
94
compare : function ( node : string , measured : any , onLayout : any ) : void {
95
95
if ( deepDiffer ( measured , onLayout ) ) {
96
- var data = { measured , onLayout } ;
96
+ const data = { measured , onLayout } ;
97
97
throw new Error (
98
98
node +
99
99
' onLayout mismatch with measure ' +
@@ -114,9 +114,9 @@ var LayoutEventsTest = createReactClass({
114
114
this . setState ( { imageLayout : e . nativeEvent . layout } , this . checkLayout ) ;
115
115
} ,
116
116
render : function ( ) {
117
- var viewStyle = [ styles . view , this . state . viewStyle ] ;
118
- var textLayout = this . state . textLayout || { width : '?' , height : '?' } ;
119
- var imageLayout = this . state . imageLayout || { x : '?' , y : '?' } ;
117
+ const viewStyle = [ styles . view , this . state . viewStyle ] ;
118
+ const textLayout = this . state . textLayout || { width : '?' , height : '?' } ;
119
+ const imageLayout = this . state . imageLayout || { x : '?' , y : '?' } ;
120
120
debug ( 'viewLayout' , this . state . viewLayout ) ;
121
121
return (
122
122
< View style = { [ styles . container , this . state . containerStyle ] } >
@@ -141,7 +141,7 @@ var LayoutEventsTest = createReactClass({
141
141
} ,
142
142
} ) ;
143
143
144
- var styles = StyleSheet . create ( {
144
+ const styles = StyleSheet . create ( {
145
145
container : {
146
146
margin : 40 ,
147
147
} ,
0 commit comments