From b17ab53686e2adcd062c7a0117ab1c13f693eac1 Mon Sep 17 00:00:00 2001 From: Isaac Stilwell Date: Tue, 28 Apr 2026 14:10:19 -0500 Subject: [PATCH] docs: add inline comments to View component --- packages/react-native/Libraries/Components/View/View.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-native/Libraries/Components/View/View.js b/packages/react-native/Libraries/Components/View/View.js index 7bf5f641944..e1e515e6ef1 100644 --- a/packages/react-native/Libraries/Components/View/View.js +++ b/packages/react-native/Libraries/Components/View/View.js @@ -30,6 +30,9 @@ component View( const hasTextAncestor = use(TextAncestorContext); let resolvedProps = props; + + // When flag is disabled, perform prop transformations of `aria-*`, `id`, and `tabIndex` + // props in JS. When flag is enabled, these transformations are performed faster in C++. if (!ReactNativeFeatureFlags.enableNativeViewPropTransformations()) { const { accessibilityState, @@ -125,6 +128,8 @@ component View( ); + // If nested within a Text component, reset the ancestor context so that children + // of this view are not treated as text descendants. if (hasTextAncestor) { return ( {actualView}