react 15.3.0 → 15.3.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/react-with-addons.js +1024 -1174
  2. package/dist/react-with-addons.min.js +6 -6
  3. package/dist/react.js +956 -1106
  4. package/dist/react.min.js +6 -6
  5. package/lib/DOMPropertyOperations.js +0 -7
  6. package/lib/EventPluginHub.js +2 -0
  7. package/lib/ReactChildReconciler.js +11 -8
  8. package/lib/{ReactChildrenMutationWarningDevtool.js → ReactChildrenMutationWarningHook.js} +11 -19
  9. package/lib/ReactComponentBrowserEnvironment.js +1 -10
  10. package/lib/ReactComponentEnvironment.js +0 -8
  11. package/lib/ReactComponentTreeDevtool.js +2 -205
  12. package/lib/ReactComponentTreeHook.js +248 -0
  13. package/lib/ReactComponentTreeTestUtils.js +11 -11
  14. package/lib/ReactCompositeComponent.js +10 -34
  15. package/lib/ReactDOM.js +9 -0
  16. package/lib/ReactDOMComponent.js +21 -42
  17. package/lib/ReactDOMComponentTree.js +1 -1
  18. package/lib/ReactDOMEmptyComponent.js +1 -1
  19. package/lib/ReactDOMInput.js +20 -2
  20. package/lib/{ReactDOMNullInputValuePropDevtool.js → ReactDOMNullInputValuePropHook.js} +5 -5
  21. package/lib/ReactDOMSelect.js +5 -4
  22. package/lib/ReactDOMTextComponent.js +1 -8
  23. package/lib/{ReactDOMUnknownPropertyDevtool.js → ReactDOMUnknownPropertyHook.js} +8 -8
  24. package/lib/ReactDebugTool.js +63 -77
  25. package/lib/ReactElementValidator.js +5 -3
  26. package/lib/{ReactHostOperationHistoryDevtool.js → ReactHostOperationHistoryHook.js} +4 -4
  27. package/lib/{ReactInvalidSetStateWarningDevTool.js → ReactInvalidSetStateWarningHook.js} +3 -3
  28. package/lib/ReactMount.js +3 -7
  29. package/lib/ReactMultiChild.js +11 -13
  30. package/lib/ReactNativeBaseComponent.js +5 -3
  31. package/lib/ReactNativeComponentEnvironment.js +0 -7
  32. package/lib/ReactNativeMount.js +2 -5
  33. package/lib/ReactNativeTextComponent.js +2 -10
  34. package/lib/ReactReconciler.js +5 -11
  35. package/lib/ReactServerRendering.js +2 -1
  36. package/lib/ReactSimpleEmptyComponent.js +3 -2
  37. package/lib/ReactTestMount.js +0 -5
  38. package/lib/ReactTestUtils.js +5 -5
  39. package/lib/ReactVersion.js +1 -1
  40. package/lib/ResponderEventPlugin.js +6 -5
  41. package/lib/SimpleEventPlugin.js +2 -0
  42. package/lib/SyntheticEvent.js +8 -1
  43. package/lib/checkReactTypeSpec.js +6 -6
  44. package/lib/createReactNativeComponentClass.js +1 -1
  45. package/lib/flattenChildren.js +7 -5
  46. package/lib/instantiateReactComponent.js +1 -28
  47. package/package.json +1 -1
  48. package/lib/ReactDOMDebugTool.js +0 -67
  49. package/lib/ReactDOMInstrumentation.js +0 -21
  50. package/lib/createHierarchyRenderer.js +0 -85
@@ -11,29 +11,35 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var ReactInvalidSetStateWarningDevTool = require('./ReactInvalidSetStateWarningDevTool');
15
- var ReactHostOperationHistoryDevtool = require('./ReactHostOperationHistoryDevtool');
16
- var ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
17
- var ReactChildrenMutationWarningDevtool = require('./ReactChildrenMutationWarningDevtool');
14
+ var ReactInvalidSetStateWarningHook = require('./ReactInvalidSetStateWarningHook');
15
+ var ReactHostOperationHistoryHook = require('./ReactHostOperationHistoryHook');
16
+ var ReactComponentTreeHook = require('./ReactComponentTreeHook');
17
+ var ReactChildrenMutationWarningHook = require('./ReactChildrenMutationWarningHook');
18
18
  var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
19
19
 
20
20
  var performanceNow = require('fbjs/lib/performanceNow');
21
21
  var warning = require('fbjs/lib/warning');
22
22
 
23
- var eventHandlers = [];
24
- var handlerDoesThrowForEvent = {};
23
+ var hooks = [];
24
+ var didHookThrowForEvent = {};
25
25
 
26
- function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
27
- eventHandlers.forEach(function (handler) {
28
- try {
29
- if (handler[handlerFunctionName]) {
30
- handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5);
31
- }
32
- } catch (e) {
33
- process.env.NODE_ENV !== 'production' ? warning(handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e + '\n' + e.stack) : void 0;
34
- handlerDoesThrowForEvent[handlerFunctionName] = true;
26
+ function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
27
+ try {
28
+ fn.call(context, arg1, arg2, arg3, arg4, arg5);
29
+ } catch (e) {
30
+ process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
31
+ didHookThrowForEvent[event] = true;
32
+ }
33
+ }
34
+
35
+ function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
36
+ for (var i = 0; i < hooks.length; i++) {
37
+ var hook = hooks[i];
38
+ var fn = hook[event];
39
+ if (fn) {
40
+ callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
35
41
  }
36
- });
42
+ }
37
43
  }
38
44
 
39
45
  var isProfiling = false;
@@ -50,21 +56,21 @@ var currentTimerType = null;
50
56
  var lifeCycleTimerHasWarned = false;
51
57
 
52
58
  function clearHistory() {
53
- ReactComponentTreeDevtool.purgeUnmountedComponents();
54
- ReactHostOperationHistoryDevtool.clearHistory();
59
+ ReactComponentTreeHook.purgeUnmountedComponents();
60
+ ReactHostOperationHistoryHook.clearHistory();
55
61
  }
56
62
 
57
63
  function getTreeSnapshot(registeredIDs) {
58
64
  return registeredIDs.reduce(function (tree, id) {
59
- var ownerID = ReactComponentTreeDevtool.getOwnerID(id);
60
- var parentID = ReactComponentTreeDevtool.getParentID(id);
65
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
66
+ var parentID = ReactComponentTreeHook.getParentID(id);
61
67
  tree[id] = {
62
- displayName: ReactComponentTreeDevtool.getDisplayName(id),
63
- text: ReactComponentTreeDevtool.getText(id),
64
- updateCount: ReactComponentTreeDevtool.getUpdateCount(id),
65
- childIDs: ReactComponentTreeDevtool.getChildIDs(id),
68
+ displayName: ReactComponentTreeHook.getDisplayName(id),
69
+ text: ReactComponentTreeHook.getText(id),
70
+ updateCount: ReactComponentTreeHook.getUpdateCount(id),
71
+ childIDs: ReactComponentTreeHook.getChildIDs(id),
66
72
  // Text nodes don't have owners but this is close enough.
67
- ownerID: ownerID || ReactComponentTreeDevtool.getOwnerID(parentID),
73
+ ownerID: ownerID || ReactComponentTreeHook.getOwnerID(parentID),
68
74
  parentID: parentID
69
75
  };
70
76
  return tree;
@@ -74,7 +80,7 @@ function getTreeSnapshot(registeredIDs) {
74
80
  function resetMeasurements() {
75
81
  var previousStartTime = currentFlushStartTime;
76
82
  var previousMeasurements = currentFlushMeasurements || [];
77
- var previousOperations = ReactHostOperationHistoryDevtool.getHistory();
83
+ var previousOperations = ReactHostOperationHistoryHook.getHistory();
78
84
 
79
85
  if (currentFlushNesting === 0) {
80
86
  currentFlushStartTime = null;
@@ -84,7 +90,7 @@ function resetMeasurements() {
84
90
  }
85
91
 
86
92
  if (previousMeasurements.length || previousOperations.length) {
87
- var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs();
93
+ var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
88
94
  flushHistory.push({
89
95
  duration: performanceNow() - previousStartTime,
90
96
  measurements: previousMeasurements || [],
@@ -99,7 +105,14 @@ function resetMeasurements() {
99
105
  }
100
106
 
101
107
  function checkDebugID(debugID) {
102
- process.env.NODE_ENV !== 'production' ? warning(debugID, 'ReactDebugTool: debugID may not be empty.') : void 0;
108
+ var allowRoot = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
109
+
110
+ if (allowRoot && debugID === 0) {
111
+ return;
112
+ }
113
+ if (!debugID) {
114
+ process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
115
+ }
103
116
  }
104
117
 
105
118
  function beginLifeCycleTimer(debugID, timerType) {
@@ -167,13 +180,13 @@ function resumeCurrentLifeCycleTimer() {
167
180
  }
168
181
 
169
182
  var ReactDebugTool = {
170
- addDevtool: function (devtool) {
171
- eventHandlers.push(devtool);
183
+ addHook: function (hook) {
184
+ hooks.push(hook);
172
185
  },
173
- removeDevtool: function (devtool) {
174
- for (var i = 0; i < eventHandlers.length; i++) {
175
- if (eventHandlers[i] === devtool) {
176
- eventHandlers.splice(i, 1);
186
+ removeHook: function (hook) {
187
+ for (var i = 0; i < hooks.length; i++) {
188
+ if (hooks[i] === hook) {
189
+ hooks.splice(i, 1);
177
190
  i--;
178
191
  }
179
192
  }
@@ -189,7 +202,7 @@ var ReactDebugTool = {
189
202
  isProfiling = true;
190
203
  flushHistory.length = 0;
191
204
  resetMeasurements();
192
- ReactDebugTool.addDevtool(ReactHostOperationHistoryDevtool);
205
+ ReactDebugTool.addHook(ReactHostOperationHistoryHook);
193
206
  },
194
207
  endProfiling: function () {
195
208
  if (!isProfiling) {
@@ -198,7 +211,7 @@ var ReactDebugTool = {
198
211
 
199
212
  isProfiling = false;
200
213
  resetMeasurements();
201
- ReactDebugTool.removeDevtool(ReactHostOperationHistoryDevtool);
214
+ ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
202
215
  },
203
216
  getFlushHistory: function () {
204
217
  return flushHistory;
@@ -225,14 +238,6 @@ var ReactDebugTool = {
225
238
  endLifeCycleTimer(debugID, timerType);
226
239
  emitEvent('onEndLifeCycleTimer', debugID, timerType);
227
240
  },
228
- onBeginReconcilerTimer: function (debugID, timerType) {
229
- checkDebugID(debugID);
230
- emitEvent('onBeginReconcilerTimer', debugID, timerType);
231
- },
232
- onEndReconcilerTimer: function (debugID, timerType) {
233
- checkDebugID(debugID);
234
- emitEvent('onEndReconcilerTimer', debugID, timerType);
235
- },
236
241
  onError: function (debugID) {
237
242
  if (currentTimerDebugID != null) {
238
243
  endLifeCycleTimer(currentTimerDebugID, currentTimerType);
@@ -249,45 +254,18 @@ var ReactDebugTool = {
249
254
  checkDebugID(debugID);
250
255
  emitEvent('onHostOperation', debugID, type, payload);
251
256
  },
252
- onComponentHasMounted: function (debugID) {
253
- checkDebugID(debugID);
254
- emitEvent('onComponentHasMounted', debugID);
255
- },
256
- onComponentHasUpdated: function (debugID) {
257
- checkDebugID(debugID);
258
- emitEvent('onComponentHasUpdated', debugID);
259
- },
260
257
  onSetState: function () {
261
258
  emitEvent('onSetState');
262
259
  },
263
- onSetDisplayName: function (debugID, displayName) {
264
- checkDebugID(debugID);
265
- emitEvent('onSetDisplayName', debugID, displayName);
266
- },
267
260
  onSetChildren: function (debugID, childDebugIDs) {
268
261
  checkDebugID(debugID);
269
262
  childDebugIDs.forEach(checkDebugID);
270
263
  emitEvent('onSetChildren', debugID, childDebugIDs);
271
264
  },
272
- onSetOwner: function (debugID, ownerDebugID) {
273
- checkDebugID(debugID);
274
- emitEvent('onSetOwner', debugID, ownerDebugID);
275
- },
276
- onSetParent: function (debugID, parentDebugID) {
277
- checkDebugID(debugID);
278
- emitEvent('onSetParent', debugID, parentDebugID);
279
- },
280
- onSetText: function (debugID, text) {
265
+ onBeforeMountComponent: function (debugID, element, parentDebugID) {
281
266
  checkDebugID(debugID);
282
- emitEvent('onSetText', debugID, text);
283
- },
284
- onMountRootComponent: function (debugID) {
285
- checkDebugID(debugID);
286
- emitEvent('onMountRootComponent', debugID);
287
- },
288
- onBeforeMountComponent: function (debugID, element) {
289
- checkDebugID(debugID);
290
- emitEvent('onBeforeMountComponent', debugID, element);
267
+ checkDebugID(parentDebugID, true);
268
+ emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
291
269
  },
292
270
  onMountComponent: function (debugID) {
293
271
  checkDebugID(debugID);
@@ -301,6 +279,10 @@ var ReactDebugTool = {
301
279
  checkDebugID(debugID);
302
280
  emitEvent('onUpdateComponent', debugID);
303
281
  },
282
+ onBeforeUnmountComponent: function (debugID) {
283
+ checkDebugID(debugID);
284
+ emitEvent('onBeforeUnmountComponent', debugID);
285
+ },
304
286
  onUnmountComponent: function (debugID) {
305
287
  checkDebugID(debugID);
306
288
  emitEvent('onUnmountComponent', debugID);
@@ -310,9 +292,13 @@ var ReactDebugTool = {
310
292
  }
311
293
  };
312
294
 
313
- ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool);
314
- ReactDebugTool.addDevtool(ReactComponentTreeDevtool);
315
- ReactDebugTool.addDevtool(ReactChildrenMutationWarningDevtool);
295
+ // TODO remove these when RN/www gets updated
296
+ ReactDebugTool.addDevtool = ReactDebugTool.addHook;
297
+ ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
298
+
299
+ ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
300
+ ReactDebugTool.addHook(ReactComponentTreeHook);
301
+ ReactDebugTool.addHook(ReactChildrenMutationWarningHook);
316
302
  var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
317
303
  if (/[?&]react_perf\b/.test(url)) {
318
304
  ReactDebugTool.beginProfiling();
@@ -19,7 +19,7 @@
19
19
  'use strict';
20
20
 
21
21
  var ReactCurrentOwner = require('./ReactCurrentOwner');
22
- var ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
22
+ var ReactComponentTreeHook = require('./ReactComponentTreeHook');
23
23
  var ReactElement = require('./ReactElement');
24
24
  var ReactPropTypeLocations = require('./ReactPropTypeLocations');
25
25
 
@@ -92,7 +92,7 @@ function validateExplicitKey(element, parentType) {
92
92
  childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
93
93
  }
94
94
 
95
- process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeDevtool.getCurrentStackAddendum(element)) : void 0;
95
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
96
96
  }
97
97
 
98
98
  /**
@@ -163,7 +163,9 @@ var ReactElementValidator = {
163
163
  var validType = typeof type === 'string' || typeof type === 'function';
164
164
  // We warn in this case but don't throw. We expect the element creation to
165
165
  // succeed and there will likely be errors in render.
166
- process.env.NODE_ENV !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
166
+ if (!validType) {
167
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
168
+ }
167
169
 
168
170
  var element = ReactElement.createElement.apply(this, arguments);
169
171
 
@@ -6,14 +6,14 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactHostOperationHistoryDevtool
9
+ * @providesModule ReactHostOperationHistoryHook
10
10
  */
11
11
 
12
12
  'use strict';
13
13
 
14
14
  var history = [];
15
15
 
16
- var ReactHostOperationHistoryDevtool = {
16
+ var ReactHostOperationHistoryHook = {
17
17
  onHostOperation: function (debugID, type, payload) {
18
18
  history.push({
19
19
  instanceID: debugID,
@@ -22,7 +22,7 @@ var ReactHostOperationHistoryDevtool = {
22
22
  });
23
23
  },
24
24
  clearHistory: function () {
25
- if (ReactHostOperationHistoryDevtool._preventClearing) {
25
+ if (ReactHostOperationHistoryHook._preventClearing) {
26
26
  // Should only be used for tests.
27
27
  return;
28
28
  }
@@ -34,4 +34,4 @@ var ReactHostOperationHistoryDevtool = {
34
34
  }
35
35
  };
36
36
 
37
- module.exports = ReactHostOperationHistoryDevtool;
37
+ module.exports = ReactHostOperationHistoryHook;
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree. An additional grant
7
7
  * of patent rights can be found in the PATENTS file in the same directory.
8
8
  *
9
- * @providesModule ReactInvalidSetStateWarningDevTool
9
+ * @providesModule ReactInvalidSetStateWarningHook
10
10
  */
11
11
 
12
12
  'use strict';
@@ -21,7 +21,7 @@ if (process.env.NODE_ENV !== 'production') {
21
21
  };
22
22
  }
23
23
 
24
- var ReactInvalidSetStateWarningDevTool = {
24
+ var ReactInvalidSetStateWarningHook = {
25
25
  onBeginProcessingChildContext: function () {
26
26
  processingChildContext = true;
27
27
  },
@@ -33,4 +33,4 @@ var ReactInvalidSetStateWarningDevTool = {
33
33
  }
34
34
  };
35
35
 
36
- module.exports = ReactInvalidSetStateWarningDevTool;
36
+ module.exports = ReactInvalidSetStateWarningHook;
package/lib/ReactMount.js CHANGED
@@ -102,7 +102,8 @@ function mountComponentIntoNode(wrapperInstance, container, transaction, shouldR
102
102
  console.time(markerName);
103
103
  }
104
104
 
105
- var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context);
105
+ var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */
106
+ );
106
107
 
107
108
  if (markerName) {
108
109
  console.timeEnd(markerName);
@@ -260,7 +261,7 @@ var ReactMount = {
260
261
  },
261
262
 
262
263
  /**
263
- * Render a new component into the DOM. Hooked by devtools!
264
+ * Render a new component into the DOM. Hooked by hooks!
264
265
  *
265
266
  * @param {ReactElement} nextElement element to render
266
267
  * @param {DOMElement} container container to render into
@@ -287,11 +288,6 @@ var ReactMount = {
287
288
  var wrapperID = componentInstance._instance.rootID;
288
289
  instancesByReactRootID[wrapperID] = componentInstance;
289
290
 
290
- if (process.env.NODE_ENV !== 'production') {
291
- // The instance here is TopLevelWrapper so we report mount for its child.
292
- ReactInstrumentation.debugTool.onMountRootComponent(componentInstance._renderedComponent._debugID);
293
- }
294
-
295
291
  return componentInstance;
296
292
  },
297
293
 
@@ -139,7 +139,6 @@ function processQueue(inst, updateQueue) {
139
139
  ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
140
140
  }
141
141
 
142
- var setParentForInstrumentation = emptyFunction;
143
142
  var setChildrenForInstrumentation = emptyFunction;
144
143
  if (process.env.NODE_ENV !== 'production') {
145
144
  var getDebugID = function (inst) {
@@ -152,11 +151,6 @@ if (process.env.NODE_ENV !== 'production') {
152
151
  }
153
152
  return inst._debugID;
154
153
  };
155
- setParentForInstrumentation = function (child) {
156
- if (child._debugID !== 0) {
157
- ReactInstrumentation.debugTool.onSetParent(child._debugID, getDebugID(this));
158
- }
159
- };
160
154
  setChildrenForInstrumentation = function (children) {
161
155
  var debugID = getDebugID(this);
162
156
  // TODO: React Native empty components are also multichild.
@@ -188,10 +182,11 @@ var ReactMultiChild = {
188
182
 
189
183
  _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
190
184
  if (process.env.NODE_ENV !== 'production') {
185
+ var selfDebugID = getDebugID(this);
191
186
  if (this._currentElement) {
192
187
  try {
193
188
  ReactCurrentOwner.current = this._currentElement._owner;
194
- return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, this._debugID);
189
+ return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
195
190
  } finally {
196
191
  ReactCurrentOwner.current = null;
197
192
  }
@@ -202,20 +197,22 @@ var ReactMultiChild = {
202
197
 
203
198
  _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
204
199
  var nextChildren;
200
+ var selfDebugID = 0;
205
201
  if (process.env.NODE_ENV !== 'production') {
202
+ selfDebugID = getDebugID(this);
206
203
  if (this._currentElement) {
207
204
  try {
208
205
  ReactCurrentOwner.current = this._currentElement._owner;
209
- nextChildren = flattenChildren(nextNestedChildrenElements, this._debugID);
206
+ nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
210
207
  } finally {
211
208
  ReactCurrentOwner.current = null;
212
209
  }
213
- ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context);
210
+ ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
214
211
  return nextChildren;
215
212
  }
216
213
  }
217
- nextChildren = flattenChildren(nextNestedChildrenElements);
218
- ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context);
214
+ nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
215
+ ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
219
216
  return nextChildren;
220
217
  },
221
218
 
@@ -236,10 +233,11 @@ var ReactMultiChild = {
236
233
  for (var name in children) {
237
234
  if (children.hasOwnProperty(name)) {
238
235
  var child = children[name];
236
+ var selfDebugID = 0;
239
237
  if (process.env.NODE_ENV !== 'production') {
240
- setParentForInstrumentation.call(this, child);
238
+ selfDebugID = getDebugID(this);
241
239
  }
242
- var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context);
240
+ var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
243
241
  child._mountIndex = index++;
244
242
  mountImages.push(mountImage);
245
243
  }
@@ -54,7 +54,7 @@ ReactNativeBaseComponent.Mixin = {
54
54
  ReactNativeComponentTree.uncacheNode(this);
55
55
  deleteAllListeners(this);
56
56
  this.unmountChildren();
57
- this._rootNodeID = null;
57
+ this._rootNodeID = 0;
58
58
  },
59
59
 
60
60
  /**
@@ -155,8 +155,10 @@ ReactNativeBaseComponent.Mixin = {
155
155
  },
156
156
 
157
157
  /**
158
- * @param {string} rootID Root ID of this subtree.
159
- * @param {Transaction} transaction For creating/updating.
158
+ * @param {ReactNativeReconcileTransaction} transaction
159
+ * @param {?ReactNativeBaseComponent} the parent component instance
160
+ * @param {?object} info about the host container
161
+ * @param {object} context
160
162
  * @return {string} Unique iOS view tag.
161
163
  */
162
164
  mountComponent: function (transaction, hostParent, hostContainerInfo, context) {