Commit d2cbc0e
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 bd99abd commit d2cbc0e
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 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
293 | | - | |
| 291 | + | |
294 | 292 | | |
295 | 293 | | |
296 | 294 | | |
| |||
4514 | 4512 | | |
4515 | 4513 | | |
4516 | 4514 | | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
4517 | 4518 | | |
4518 | 4519 | | |
4519 | 4520 | | |
| |||
5361 | 5362 | | |
5362 | 5363 | | |
5363 | 5364 | | |
5364 | | - | |
| 5365 | + | |
5365 | 5366 | | |
5366 | 5367 | | |
5367 | 5368 | | |
| |||
5752 | 5753 | | |
5753 | 5754 | | |
5754 | 5755 | | |
5755 | | - | |
| 5756 | + | |
5756 | 5757 | | |
5757 | 5758 | | |
5758 | 5759 | | |
| |||
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