@samitouri / QOS-React / commits / 4fcdf02068

Listeners are not attached by ID in the API

...even though they technically still are attached by.

Sebastian Markbage committed Apr 4, 2016 at 19:44 UTC 4fcdf02068b71b5873a890fda22c62471fd47d95
1 file changed +4 -4
src/renderers/native/ReactNative/ReactNativeBaseComponent.js
+4 -4
@@ -59,7 +59,7 @@ ReactNativeBaseComponent.Mixin = {
59
60 unmountComponent: function() {
61 ReactNativeComponentTree.uncacheNode(this);
62 - deleteAllListeners(this._rootNodeID);
62 + deleteAllListeners(this);
63 this.unmountChildren();
64 this._rootNodeID = null;
65 },
@@ -141,7 +141,7 @@ ReactNativeBaseComponent.Mixin = {
141 // registers listeners the *first* time a component is created.
142 if (registrationNames[key] && initialProps[key]) {
143 var listener = initialProps[key];
144 - putListener(this._rootNodeID, key, listener);
144 + putListener(this, key, listener);
145 }
146 }
147 },
@@ -155,9 +155,9 @@ ReactNativeBaseComponent.Mixin = {
155 for (var key in nextProps) {
156 if (registrationNames[key] && (nextProps[key] !== prevProps[key])) {
157 if (nextProps[key]) {
158 - putListener(this._rootNodeID, key, nextProps[key]);
158 + putListener(this, key, nextProps[key]);
159 } else {
160 - deleteListener(this._rootNodeID, key);
160 + deleteListener(this, key);
161 }
162 }
163 }