From 49d5e7c5195356269ccbc159addc585126696df1 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 15 Nov 2022 06:30:42 -0800 Subject: [PATCH] Remove feature flag removeListenersOnDetach Summary: changelog: [internal] Remove unused feature flag. Reviewed By: yungsters Differential Revision: D41188496 fbshipit-source-id: 13507197e7943aea9303ffb828feddb77c94ab0c --- Libraries/Animated/nodes/AnimatedNode.js | 4 +--- Libraries/ReactNative/ReactNativeFeatureFlags.js | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Libraries/Animated/nodes/AnimatedNode.js b/Libraries/Animated/nodes/AnimatedNode.js index 890e9e865bc11d..a77bba2db42549 100644 --- a/Libraries/Animated/nodes/AnimatedNode.js +++ b/Libraries/Animated/nodes/AnimatedNode.js @@ -30,9 +30,7 @@ export default class AnimatedNode { __nativeAnimatedValueListener: ?any; __attach(): void {} __detach(): void { - if (ReactNativeFeatureFlags.removeListenersOnDetach()) { - this.removeAllListeners(); - } + this.removeAllListeners(); if (this.__isNative && this.__nativeTag != null) { NativeAnimatedHelper.API.dropAnimatedNode(this.__nativeTag); this.__nativeTag = undefined; diff --git a/Libraries/ReactNative/ReactNativeFeatureFlags.js b/Libraries/ReactNative/ReactNativeFeatureFlags.js index 1e5845c77dcd45..629137ce35b056 100644 --- a/Libraries/ReactNative/ReactNativeFeatureFlags.js +++ b/Libraries/ReactNative/ReactNativeFeatureFlags.js @@ -43,8 +43,6 @@ export type FeatureFlags = {| * to render react components driven by classes written in C++. */ enableCppRenderSystem: () => boolean, - - removeListenersOnDetach: () => boolean, |}; const ReactNativeFeatureFlags: FeatureFlags = { @@ -54,7 +52,6 @@ const ReactNativeFeatureFlags: FeatureFlags = { animatedShouldDebounceQueueFlush: () => false, animatedShouldUseSingleOp: () => false, enableCppRenderSystem: () => false, - removeListenersOnDetach: () => false, }; module.exports = ReactNativeFeatureFlags;