mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
da39b07298
Summary: Adding a handwritten view config for RCTScrollView, to be used in DEV only (for now). Changelog: [Internal] Reviewed By: rickhanlonii Differential Revision: D18263203 fbshipit-source-id: 975499f030c7caed9851bcde0be42c5058911ad5
33 lines
952 B
JavaScript
33 lines
952 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';
|
|
|
|
const registerGeneratedViewConfig = require('../../Utilities/registerGeneratedViewConfig');
|
|
const requireNativeComponent = require('../../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);
|