SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Remove TextAncestor import from rn-tester TextExample (#51603)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51603

In `rn-tester` TextAncestor was used to create a inlineView wrapper:

```js
function InlineView(props) {
  return (
    <TextAncestor.Provider value={false}>
      <View {...props} />
    </TextAncestor.Provider>
  );
}
```

however, it is already done in View.js and TextAncestor shouldn't be used outside of react-native package:

```js
 if (hasTextAncestor) {
    return <TextAncestor value={false}>{actualView}</TextAncestor>;
  }
  return actualView;
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75408231

fbshipit-source-id: 7f12278296dcfe56246f6b7065f5a094e4099f7a
D
Dawid Małecki committed
b34e56259aac7967c4973dca6374faa48aa131ed
Parent: 9be5ac1
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 5/27/2025, 8:21:17 AM