Files
react-native/packages/react-native/React/CoreModules
Riccardo CipolleschiandFacebook GitHub Bot d46d80d2ef Register RCTDeviceInfo to invalidating and cleanup observer (#42396)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42396

Cmmunity reported [#42120](https://github.com/facebook/react-native/issues/42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating.

Upon investigation, I realized that:
1. The RCTDeviceInfo module is never invalidated
2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up.

This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers.

## Changelog:
[iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge

Reviewed By: RSNara

Differential Revision: D52912604

fbshipit-source-id: 1727bcdef5393b1bd5a272e2143bc65456c2a389
2024-01-24 06:44:29 -08:00
..
2023-07-19 01:10:23 -07:00
2023-07-19 01:10:23 -07:00
2023-06-15 18:05:55 -07:00
2023-12-11 06:06:12 -08:00
2023-06-15 18:05:55 -07:00