mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
08757962d2
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