diff --git a/React/Fabric/Mounting/RCTComponentViewRegistry.mm b/React/Fabric/Mounting/RCTComponentViewRegistry.mm index a274af78d45..23d08cef831 100644 --- a/React/Fabric/Mounting/RCTComponentViewRegistry.mm +++ b/React/Fabric/Mounting/RCTComponentViewRegistry.mm @@ -77,8 +77,6 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024; @implementation RCTComponentViewRegistry { better::map _registry; better::map> _recyclePool; - - std::unordered_set _mountingTransactionObservers; } - (instancetype)init @@ -135,11 +133,6 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024; _registry.insert({tag, componentViewDescriptor}); - if (componentViewDescriptor.observesMountingTransactionDidMount || - componentViewDescriptor.observesMountingTransactionWillMount) { - _mountingTransactionObservers.insert(componentViewDescriptor); - } - #ifdef LEGACY_UIMANAGER_INTEGRATION_ENABLED [RCTUIManager registerView:componentViewDescriptor.view]; #endif @@ -160,11 +153,6 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024; [RCTUIManager unregisterView:componentViewDescriptor.view]; #endif - if (componentViewDescriptor.observesMountingTransactionDidMount || - componentViewDescriptor.observesMountingTransactionWillMount) { - _mountingTransactionObservers.erase(componentViewDescriptor); - } - _registry.erase(tag); componentViewDescriptor.view.tag = 0; [self _enqueueComponentViewWithComponentHandle:componentHandle componentViewDescriptor:componentViewDescriptor];