Skip to content

Delete TextAncestor compatibility shim#56813

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

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

Conversation

@yaminyassin

@yaminyassin yaminyassin commented May 13, 2026

Copy link
Copy Markdown

Summary

Re-opened version of #56813 after 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] - Delete Libraries/Text/TextAncestor compatibility shim

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 #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 May 13, 2026
@huntie

huntie commented May 13, 2026

Copy link
Copy Markdown
Member

Let's see if this passes CI once imported 😄

@yaminyassin yaminyassin marked this pull request as ready for review June 10, 2026 13:24
@yaminyassin

Copy link
Copy Markdown
Author

facebook/react-strict-dom#477 PR merged!

@huntie could you review this one

@meta-codesync

meta-codesync Bot commented Jun 10, 2026

Copy link
Copy Markdown

@huntie has imported this pull request. If you are a Meta employee, you can view this in D108144363.

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@yaminyassin yaminyassin closed this by deleting the head repository 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants