Skip to content

Delete TextAncestor compatibility shim#57177

Open
yaminyassin wants to merge 1 commit into
react:mainfrom
yaminyassin:chore/delete-text-ancestor-shim
Open

Delete TextAncestor compatibility shim#57177
yaminyassin wants to merge 1 commit into
react:mainfrom
yaminyassin:chore/delete-text-ancestor-shim

Conversation

@yaminyassin

@yaminyassin yaminyassin commented Jun 11, 2026

Copy link
Copy Markdown

Summary

This is the replacement for #56813. GitHub could not reopen the original PR because I had to delete and recreate my fork.

This deletes packages/react-native/Libraries/Text/TextAncestor.js, a compatibility shim for the old react-strict-dom deep import. react-strict-dom now uses the public unstable_TextAncestorContext API instead.

Changelog:

[Internal] [Removed] - Remove the Libraries/Text/TextAncestor compatibility shim after react-strict-dom moved to unstable_TextAncestorContext

Test Plan

Validated locally on chore/delete-text-ancestor-shim.

yarn install --frozen-lockfile --ignore-scripts
yarn lint
yarn flow
yarn test-typescript
yarn test --watchman=false
yarn build-types --validate

All checks passed. Jest passed with 275 test suites, 5635 tests, 1 skipped, and 1798 snapshots.

The shim file `packages/react-native/Libraries/Text/TextAncestor.js`
was kept solely to support react-strict-dom's deep import. The
file's own comment carried a TODO from @huntie to delete it once
the cross-repo reference was fixed.

react-strict-dom has now switched to the public
`unstable_TextAncestorContext` API
(react/react-strict-dom#477), exposed in react#52368.

No internal React Native consumers reference this shim — both
`packages/react-native/index.js` and `index.js.flow` import
`./Libraries/Text/TextAncestorContext` directly.

## Changelog:

[INTERNAL] - Delete TextAncestor compatibility shim
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2026
@yaminyassin yaminyassin marked this pull request as ready for review June 11, 2026 19:35
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant