mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
4efdf264d1
Summary: Problem: In paper, there is a handy API called `[uiManager viewForReactTag:]`. Fabric does not have this mapping. The Fabric interop layer still relies on this Paper mapping. Solution: As a workaround, re-create this mapping in the Fabric interop layer. Therefore, whenever Fabric interop layer asks a paper view manager to create a view, store a weak reference to the view in a `NSMapTable`. NSMapTable allows us to customize the strong/weak relationship. I've added a comment explaining that `RCTWeakViewHolder` only needs to be used for this special circumstance. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D27438899 fbshipit-source-id: 94663ef06479a8c863ce58b0f36d42109fa1c4f3