Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/react-native/Libraries/Components/View/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -125,6 +128,8 @@ component View(
<ViewNativeComponent {...resolvedProps} ref={ref} />
);

// 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 (
<TextAncestorContext value={false}>{actualView}</TextAncestorContext>
Expand Down
Loading