@samitouri / QOS-React-2 / commits / 61db53c179

[Native] Add RCTSelectableText as a recognized Text component (#35780)

## Summary Add "RCTSelectableText" to the list of component names recognized as being inside a text element, alongside "RCTText". React Native's new text stack, tries to optimize and allows differentiating between a custom TextView, with lower level control, that can reuse the work performed during Fabric/Yoga layout, and a native TextView, used for fidelity. On Android at least, the only place we've needed native TextView for fidelity/native UX has been support for `selectable` text, which has many unique UI interactions. ## How did you test this change? When I patch this in, alongside https://github.com/facebook/react-native/pull/55552, we no longer see warnings when we render text inside of RCTSelectableText component. --------- Co-authored-by: Eli White <github@eli-white.com>

Nick Gerleman committed Feb 17, 2026 at 16:16 UTC 61db53c179a80a40beec3cc220da05bfdbb02efd
2 files changed +2
packages/react-native-renderer/src/ReactFiberConfigFabric.js
+1
@@ -278,6 +278,7 @@ export function getChildHostContext(
278 const isInAParentText =
279 type === 'AndroidTextInput' || // Android
280 type === 'RCTMultilineTextInputView' || // iOS
281 + type === 'RCTSelectableText' ||
282 type === 'RCTSinglelineTextInputView' || // iOS
283 type === 'RCTText' ||
284 type === 'RCTVirtualText';
packages/react-native-renderer/src/ReactFiberConfigNative.js
+1
@@ -275,6 +275,7 @@ export function getChildHostContext(
275 const isInAParentText =
276 type === 'AndroidTextInput' || // Android
277 type === 'RCTMultilineTextInputView' || // iOS
278 + type === 'RCTSelectableText' ||
279 type === 'RCTSinglelineTextInputView' || // iOS
280 type === 'RCTText' ||
281 type === 'RCTVirtualText';