From 4fcdf02068b71b5873a890fda22c62471fd47d95 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Mon, 4 Apr 2016 19:44:31 -0700 Subject: [PATCH] Listeners are not attached by ID in the API ...even though they technically still are attached by. --- .../native/ReactNative/ReactNativeBaseComponent.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderers/native/ReactNative/ReactNativeBaseComponent.js b/src/renderers/native/ReactNative/ReactNativeBaseComponent.js index ed21216ce6..4a87bc2d76 100644 --- a/src/renderers/native/ReactNative/ReactNativeBaseComponent.js +++ b/src/renderers/native/ReactNative/ReactNativeBaseComponent.js @@ -59,7 +59,7 @@ ReactNativeBaseComponent.Mixin = { unmountComponent: function() { ReactNativeComponentTree.uncacheNode(this); - deleteAllListeners(this._rootNodeID); + deleteAllListeners(this); this.unmountChildren(); this._rootNodeID = null; }, @@ -141,7 +141,7 @@ ReactNativeBaseComponent.Mixin = { // registers listeners the *first* time a component is created. if (registrationNames[key] && initialProps[key]) { var listener = initialProps[key]; - putListener(this._rootNodeID, key, listener); + putListener(this, key, listener); } } }, @@ -155,9 +155,9 @@ ReactNativeBaseComponent.Mixin = { for (var key in nextProps) { if (registrationNames[key] && (nextProps[key] !== prevProps[key])) { if (nextProps[key]) { - putListener(this._rootNodeID, key, nextProps[key]); + putListener(this, key, nextProps[key]); } else { - deleteListener(this._rootNodeID, key); + deleteListener(this, key); } } }