Commit 0fca477
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 577f41e commit 0fca477
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 | | |
| |||
4503 | 4501 | | |
4504 | 4502 | | |
4505 | 4503 | | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
4506 | 4507 | | |
4507 | 4508 | | |
4508 | 4509 | | |
| |||
5350 | 5351 | | |
5351 | 5352 | | |
5352 | 5353 | | |
5353 | | - | |
| 5354 | + | |
5354 | 5355 | | |
5355 | 5356 | | |
5356 | 5357 | | |
| |||
5741 | 5742 | | |
5742 | 5743 | | |
5743 | 5744 | | |
5744 | | - | |
| 5745 | + | |
5745 | 5746 | | |
5746 | 5747 | | |
5747 | 5748 | | |
| |||
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