Commit b7fbc1b
Refresh DeviceInfo constants on each read (#57715)
Summary:
Pull Request resolved: #57715
Update `NativeDeviceInfo.getConstants()` to read directly from the native module instead of retaining a stale JS-side cache.
Changelog:
[General][Fixed] - Refresh `DeviceInfo` constants on each read
Test Plan:
- `yarn build-types --validate`
- `arc lint xplat/js/react-native-github/packages/react-native/ReactNativeApi.d.ts`
- Verify Dimensions updates after resizing the RNTester window.
Reviewed By: javache
Differential Revision: D113758830
Pulled By: cipolleschi1 parent 162997b commit b7fbc1b
2 files changed
Lines changed: 9 additions & 18 deletions
File tree
- packages/react-native
- src/private/specs_DEPRECATED/modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
286 | | - | |
| 284 | + | |
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
| |||
4511 | 4509 | | |
4512 | 4510 | | |
4513 | 4511 | | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
4514 | 4515 | | |
4515 | 4516 | | |
4516 | 4517 | | |
| |||
5358 | 5359 | | |
5359 | 5360 | | |
5360 | 5361 | | |
5361 | | - | |
| 5362 | + | |
5362 | 5363 | | |
5363 | 5364 | | |
5364 | 5365 | | |
| |||
5749 | 5750 | | |
5750 | 5751 | | |
5751 | 5752 | | |
5752 | | - | |
| 5753 | + | |
5753 | 5754 | | |
5754 | 5755 | | |
5755 | 5756 | | |
| |||
Lines changed: 1 addition & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 48 | | |
59 | | - | |
| 49 | + | |
0 commit comments