mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d7b1d3359f
Summary: Migrate ScrollView component to use ES6 import motivation: trying to slowly migrate each files to use es6 import/exports to make this discussion happen https://github.com/react-native-community/discussions-and-proposals/issues/201#issuecomment-588454552 ## Changelog [General] [Changed] - Use es6 import/export syntax for ScrollView component Pull Request resolved: https://github.com/facebook/react-native/pull/29184 Test Plan: Test on RNTester for iOS currently having trouble starting up RNTester on Android, but will update when I'm able to check on Android Reviewed By: TheSavior Differential Revision: D22959782 Pulled By: PeteTheHeat fbshipit-source-id: c909bddda3b5b2edd26a526eedaa67fadd4c2b51
33 lines
942 B
JavaScript
33 lines
942 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import registerGeneratedViewConfig from '../../Utilities/registerGeneratedViewConfig';
|
|
import requireNativeComponent from '../../ReactNative/requireNativeComponent';
|
|
import ScrollViewViewConfig from './ScrollViewViewConfig';
|
|
|
|
import type {
|
|
ScrollViewNativeProps,
|
|
ScrollViewNativeComponentType,
|
|
} from './ScrollViewNativeComponentType';
|
|
|
|
let ScrollViewNativeComponent;
|
|
if (global.RN$Bridgeless) {
|
|
registerGeneratedViewConfig('RCTScrollView', ScrollViewViewConfig);
|
|
ScrollViewNativeComponent = 'RCTScrollView';
|
|
} else {
|
|
ScrollViewNativeComponent = requireNativeComponent<ScrollViewNativeProps>(
|
|
'RCTScrollView',
|
|
);
|
|
}
|
|
|
|
export default ((ScrollViewNativeComponent: any): ScrollViewNativeComponentType);
|