Skip to content

Commit a06c0da

Browse files
nissy-devfacebook-github-bot
authored andcommitted
Remove var in Libraries/Component (#22020)
Summary: I removed `var` in Libraries/Component. - [x] npm run prettier - [x] npm run flow-check-ios - [x] npm run flow-check-android [GENERAL] [ENHANCEMENT] [Libraries/Component] - remove `var` Pull Request resolved: #22020 Differential Revision: D12843058 Pulled By: TheSavior fbshipit-source-id: 90723f3905191cbd29cb18474c700ac65f2503cd
1 parent 31bb551 commit a06c0da

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Libraries/Components/RefreshControl/RefreshControl.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ const nullthrows = require('nullthrows');
2020
import type {ColorValue} from 'StyleSheetTypes';
2121
import type {ViewProps} from 'ViewPropTypes';
2222

23+
let RefreshLayoutConsts;
2324
if (Platform.OS === 'android') {
2425
const AndroidSwipeRefreshLayout = require('UIManager').getViewManagerConfig(
2526
'AndroidSwipeRefreshLayout',
2627
);
27-
var RefreshLayoutConsts = AndroidSwipeRefreshLayout
28+
RefreshLayoutConsts = AndroidSwipeRefreshLayout
2829
? AndroidSwipeRefreshLayout.Constants
2930
: {SIZE: {}};
3031
} else {
31-
var RefreshLayoutConsts = {SIZE: {}};
32+
RefreshLayoutConsts = {SIZE: {}};
3233
}
3334
type NativeRefreshControlType = Class<NativeComponent<RefreshControlProps>>;
3435

Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,21 @@ class TabBarItemIOS extends React.Component<Props, State> {
132132
showedDeprecationWarning = true;
133133
}
134134
}
135-
135+
136136
render() {
137137
const {style, children, ...props} = this.props;
138138

139139
// if the tab has already been shown once, always continue to show it so we
140140
// preserve state between tab transitions
141+
let tabContents;
141142
if (this.state.hasBeenSelected) {
142-
var tabContents = (
143+
tabContents = (
143144
<StaticContainer shouldUpdate={this.props.selected}>
144145
{children}
145146
</StaticContainer>
146147
);
147148
} else {
148-
var tabContents = <View />;
149+
tabContents = <View />;
149150
}
150151

151152
return (

0 commit comments

Comments
 (0)