Files
react-native/Libraries/ReactNative
Rubén Norte 08757962d2 Use getter instead of constant to provide access to FabricUIManager binding
Summary:
The `FabricUIManager` module was providing access to the global binding defined by Fabric, adding proper typing for it.

The problem about this module is that it only evaluated the global binding once (during module evaluation) and it cached the result. If this module happened to be loaded before the binding is defined, which can happen in apps using the legacy renderer and Fabric together, this modules caches an `undefined` value indefinitely.

This refactors the module as a getter function to make sure this lazy behavior is handled correctly in the callsites.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D44065186

fbshipit-source-id: 7c5cfe674605f03ecb8ca0dabc4c823e0013da6b
2023-03-15 08:36:40 -07:00
..
2023-03-03 17:06:58 -08:00
2022-12-15 10:04:11 -08:00
2022-11-02 14:58:37 -07:00