diff --git a/packages/react-native/Libraries/Components/SafeAreaView/SafeAreaView.js b/packages/react-native/Libraries/Components/SafeAreaView/SafeAreaView.js index 3ce101533fe852..a154c827511f34 100644 --- a/packages/react-native/Libraries/Components/SafeAreaView/SafeAreaView.js +++ b/packages/react-native/Libraries/Components/SafeAreaView/SafeAreaView.js @@ -14,8 +14,6 @@ import Platform from '../../Utilities/Platform'; import View from '../View/View'; import * as React from 'react'; -let exported: React.AbstractComponent>; - /** * Renders nested content and automatically applies paddings reflect the portion * of the view that is not covered by navigation bars, tab bars, toolbars, and @@ -25,7 +23,10 @@ let exported: React.AbstractComponent>; * limitation of the screen, such as rounded corners or camera notches (aka * sensor housing area on iPhone X). */ -exported = Platform.select({ +const exported: React.AbstractComponent< + ViewProps, + React.ElementRef, +> = Platform.select({ ios: require('./RCTSafeAreaViewNativeComponent').default, default: View, }); diff --git a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h index 64ca6231394e04..5a95f3b9decd53 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h @@ -25,13 +25,6 @@ class SafeAreaViewShadowNode final : public ConcreteViewShadowNode< ViewEventEmitter, SafeAreaViewState> { using ConcreteViewShadowNode::ConcreteViewShadowNode; - - public: - static ShadowNodeTraits BaseTraits() { - auto traits = ConcreteViewShadowNode::BaseTraits(); - traits.set(ShadowNodeTraits::Trait::DirtyYogaNode); - return traits; - } }; } // namespace facebook::react