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
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
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 type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
|
|
const AndroidHorizontalScrollContentViewViewConfig = {
|
|
uiViewClassName: 'AndroidHorizontalScrollContentView',
|
|
bubblingEventTypes: {},
|
|
directEventTypes: {},
|
|
validAttributes: {},
|
|
};
|
|
|
|
let AndroidHorizontalScrollContentViewNativeComponent;
|
|
if (global.RN$Bridgeless) {
|
|
registerGeneratedViewConfig(
|
|
'AndroidHorizontalScrollContentView',
|
|
AndroidHorizontalScrollContentViewViewConfig,
|
|
);
|
|
AndroidHorizontalScrollContentViewNativeComponent =
|
|
'AndroidHorizontalScrollContentView';
|
|
} else {
|
|
AndroidHorizontalScrollContentViewNativeComponent = requireNativeComponent<ViewProps>(
|
|
'AndroidHorizontalScrollContentView',
|
|
);
|
|
}
|
|
|
|
export default ((AndroidHorizontalScrollContentViewNativeComponent: any): HostComponent<ViewProps>);
|