mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-12 10:28:07 +08:00
Summary: This allows an unsupported component to be rendered as a "unimplemented view" for better visualization of which component is missing. It is off by default, but configurable in the component factory. For now, the layout simply follows regular <View />, which means the width/height etc is based on the react component styling. The side effect is that components with 0 height/width won't show up at all. Reviewed By: mdvacca Differential Revision: D14869656 fbshipit-source-id: f31e012fb7dc1c64fcc431ea5aa45079a23a618e
30 lines
721 B
JavaScript
30 lines
721 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 requireNativeComponent = require('requireNativeComponent');
|
|
|
|
import type {ViewProps} from 'ViewPropTypes';
|
|
import type {ViewStyleProp} from 'StyleSheet';
|
|
import type {NativeComponent} from 'ReactNative';
|
|
|
|
type NativeProps = $ReadOnly<{|
|
|
...ViewProps,
|
|
name?: ?string,
|
|
style?: ?ViewStyleProp,
|
|
|}>;
|
|
|
|
type UnimplementedViewNativeType = Class<NativeComponent<NativeProps>>;
|
|
|
|
module.exports = ((requireNativeComponent(
|
|
'UnimplementedNativeView',
|
|
): any): UnimplementedViewNativeType);
|