/** * Copyright (c) Nicolas Gallagher. * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import * as React from 'react'; import StyleSheet from '../StyleSheet'; import View from '../View'; type Props = { WrapperComponent?: ?React.ComponentType<*>, // $FlowFixMe children?: React.Children, rootTag: any, }; const RootTagContext: React.Context = React.createContext(null); const AppContainer: React.AbstractComponent = React.forwardRef((props: Props, forwardedRef?: React.Ref) => { const { children, WrapperComponent } = props; let innerView = ; if (WrapperComponent) { innerView = {innerView}; } return {innerView} ; }); AppContainer.displayName = 'AppContainer'; export default AppContainer; const styles = StyleSheet.create({ appContainer: { flex: 1, pointerEvents: 'box-none' } });