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: https://github.com/facebook/react-native/pull/22020

Differential Revision: D12843058

Pulled By: TheSavior

fbshipit-source-id: 90723f3905191cbd29cb18474c700ac65f2503cd
This commit is contained in:
nd-02110114
2018-10-30 12:38:26 -07:00
committed by Facebook Github Bot
parent 31bb551e75
commit a06c0da828
2 changed files with 7 additions and 5 deletions

View File

@@ -20,15 +20,16 @@ const nullthrows = require('nullthrows');
import type {ColorValue} from 'StyleSheetTypes';
import type {ViewProps} from 'ViewPropTypes';
let RefreshLayoutConsts;
if (Platform.OS === 'android') {
const AndroidSwipeRefreshLayout = require('UIManager').getViewManagerConfig(
'AndroidSwipeRefreshLayout',
);
var RefreshLayoutConsts = AndroidSwipeRefreshLayout
RefreshLayoutConsts = AndroidSwipeRefreshLayout
? AndroidSwipeRefreshLayout.Constants
: {SIZE: {}};
} else {
var RefreshLayoutConsts = {SIZE: {}};
RefreshLayoutConsts = {SIZE: {}};
}
type NativeRefreshControlType = Class<NativeComponent<RefreshControlProps>>;