Commit c4e69e0
Use public unstable_TextAncestorContext API (#477)
* Use public unstable_TextAncestorContext API
React Native 0.81 exposed TextAncestorContext as a public API
(react/react-native#52368). Switch from the deep import path
'react-native/Libraries/Text/TextAncestor' to the public
'unstable_TextAncestorContext' export.
The deep-import target file in React Native exists solely as a
backwards-compatibility shim for react-strict-dom — see
https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Text/TextAncestor.js
which carries a TODO from @huntie to delete it once this cross-repo
reference is fixed.
Same React Context object, no behavioral change. Test mock updated
to match the new import path; old deep-import mock deleted.
* Update benchmark react-native mock for unstable_TextAncestorContext
---------
Co-authored-by: Yamin Yassin <Yamin.Yassin+CAG@cagtechhub.com>1 parent 78ba6bd commit c4e69e0
6 files changed
Lines changed: 5 additions & 28 deletions
File tree
- packages
- benchmarks/perf
- mocks
- react-strict-dom
- src/native/react-native
- tests/__mocks__/react-native
- Libraries/Text
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
0 commit comments