diff --git a/src/renderers/dom/client/ReactMount.js b/src/renderers/dom/client/ReactMount.js index 4db71492bbdd6..2db80798b269a 100644 --- a/src/renderers/dom/client/ReactMount.js +++ b/src/renderers/dom/client/ReactMount.js @@ -83,14 +83,12 @@ function internalGetID(node) { * Mounts this component and inserts it into the DOM. * * @param {ReactComponent} componentInstance The instance to mount. - * @param {string} rootID DOM ID of the root node. * @param {DOMElement} container DOM element to mount into. * @param {ReactReconcileTransaction} transaction * @param {boolean} shouldReuseMarkup If true, do not insert markup */ function mountComponentIntoNode( wrapperInstance, - rootID, container, transaction, shouldReuseMarkup, @@ -98,7 +96,6 @@ function mountComponentIntoNode( ) { var markup = ReactReconciler.mountComponent( wrapperInstance, - rootID, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), @@ -118,13 +115,11 @@ function mountComponentIntoNode( * Batched mount. * * @param {ReactComponent} componentInstance The instance to mount. - * @param {string} rootID DOM ID of the root node. * @param {DOMElement} container DOM element to mount into. * @param {boolean} shouldReuseMarkup If true, do not insert markup */ function batchedMountComponentIntoNode( componentInstance, - rootID, container, shouldReuseMarkup, context @@ -137,7 +132,6 @@ function batchedMountComponentIntoNode( mountComponentIntoNode, null, componentInstance, - rootID, container, transaction, shouldReuseMarkup, @@ -311,7 +305,6 @@ var ReactMount = { ReactUpdates.batchedUpdates( batchedMountComponentIntoNode, componentInstance, - '', container, shouldReuseMarkup, context diff --git a/src/renderers/dom/server/ReactServerRendering.js b/src/renderers/dom/server/ReactServerRendering.js index ffec7fcdf5a5a..c80c1dad95849 100644 --- a/src/renderers/dom/server/ReactServerRendering.js +++ b/src/renderers/dom/server/ReactServerRendering.js @@ -43,7 +43,6 @@ function renderToStringImpl(element, makeStaticMarkup) { return transaction.perform(function() { var componentInstance = instantiateReactComponent(element, null); var markup = componentInstance.mountComponent( - '', transaction, null, ReactDOMContainerInfo(), diff --git a/src/renderers/dom/shared/ReactDOMComponent.js b/src/renderers/dom/shared/ReactDOMComponent.js index 27ed5b6767cc4..6b7a8ec659c1b 100644 --- a/src/renderers/dom/shared/ReactDOMComponent.js +++ b/src/renderers/dom/shared/ReactDOMComponent.js @@ -543,7 +543,6 @@ ReactDOMComponent.Mixin = { * is not idempotent. * * @internal - * @param {string} rootID The root DOM ID for this node. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction * @param {?ReactDOMComponent} the containing DOM component instance * @param {?object} info about the native container @@ -551,7 +550,6 @@ ReactDOMComponent.Mixin = { * @return {string} The computed markup. */ mountComponent: function( - rootID, transaction, nativeParent, nativeContainerInfo, diff --git a/src/renderers/dom/shared/ReactDOMTextComponent.js b/src/renderers/dom/shared/ReactDOMTextComponent.js index 4ffa9c4746d0b..d45fa1a4489b0 100644 --- a/src/renderers/dom/shared/ReactDOMTextComponent.js +++ b/src/renderers/dom/shared/ReactDOMTextComponent.js @@ -66,13 +66,11 @@ assign(ReactDOMTextComponent.prototype, { * Creates the markup for this text node. This node is not intended to have * any features besides containing text content. * - * @param {string} rootID DOM ID of the root node. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction * @return {string} Markup for this text node. * @internal */ mountComponent: function( - rootID, transaction, nativeParent, nativeContainerInfo, diff --git a/src/renderers/shared/reconciler/ReactCompositeComponent.js b/src/renderers/shared/reconciler/ReactCompositeComponent.js index 22e5cc2b9a0fb..b341eec2f8d37 100644 --- a/src/renderers/shared/reconciler/ReactCompositeComponent.js +++ b/src/renderers/shared/reconciler/ReactCompositeComponent.js @@ -120,7 +120,6 @@ var ReactCompositeComponentMixin = { /** * Initializes the component, renders markup, and registers event listeners. * - * @param {string} rootID DOM ID of the root node. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction * @param {?object} nativeParent * @param {?object} nativeContainerInfo @@ -130,7 +129,6 @@ var ReactCompositeComponentMixin = { * @internal */ mountComponent: function( - rootID, transaction, nativeParent, nativeContainerInfo, @@ -138,7 +136,6 @@ var ReactCompositeComponentMixin = { ) { this._context = context; this._mountOrder = nextMountID++; - this._rootNodeID = rootID; this._nativeParent = nativeParent; this._nativeContainerInfo = nativeContainerInfo; @@ -302,7 +299,6 @@ var ReactCompositeComponentMixin = { var markup = ReactReconciler.mountComponent( this._renderedComponent, - rootID, transaction, nativeParent, nativeContainerInfo, @@ -764,7 +760,6 @@ var ReactCompositeComponentMixin = { ); var nextMarkup = ReactReconciler.mountComponent( this._renderedComponent, - this._rootNodeID, transaction, this._nativeParent, this._nativeContainerInfo, diff --git a/src/renderers/shared/reconciler/ReactEmptyComponent.js b/src/renderers/shared/reconciler/ReactEmptyComponent.js index c9df64d031680..3095638b4ec70 100644 --- a/src/renderers/shared/reconciler/ReactEmptyComponent.js +++ b/src/renderers/shared/reconciler/ReactEmptyComponent.js @@ -26,23 +26,19 @@ var ReactEmptyComponentInjection = { var ReactEmptyComponent = function(instantiate) { this._currentElement = null; - this._rootNodeID = null; this._renderedComponent = instantiate(placeholderElement); }; assign(ReactEmptyComponent.prototype, { construct: function(element) { }, mountComponent: function( - rootID, transaction, nativeParent, nativeContainerInfo, context ) { - this._rootNodeID = rootID; return ReactReconciler.mountComponent( this._renderedComponent, - rootID, transaction, nativeParent, nativeContainerInfo, @@ -54,9 +50,8 @@ assign(ReactEmptyComponent.prototype, { getNativeNode: function() { return ReactReconciler.getNativeNode(this._renderedComponent); }, - unmountComponent: function(rootID, transaction, context) { + unmountComponent: function() { ReactReconciler.unmountComponent(this._renderedComponent); - this._rootNodeID = null; this._renderedComponent = null; }, }); diff --git a/src/renderers/shared/reconciler/ReactMultiChild.js b/src/renderers/shared/reconciler/ReactMultiChild.js index 1b0be8c5631f4..39c5a7a2fde7c 100644 --- a/src/renderers/shared/reconciler/ReactMultiChild.js +++ b/src/renderers/shared/reconciler/ReactMultiChild.js @@ -251,7 +251,6 @@ var ReactMultiChild = { var child = children[name]; var mountImage = ReactReconciler.mountComponent( child, - name, transaction, this, this._nativeContainerInfo, @@ -394,8 +393,8 @@ var ReactMultiChild = { this._unmountChild(prevChild); } // The child must be instantiated before it's mounted. - this._mountChildByNameAtIndex( - nextChild, name, nextIndex, transaction, context + this._mountChildAtIndex( + nextChild, nextIndex, transaction, context ); } nextIndex++; @@ -502,15 +501,13 @@ var ReactMultiChild = { * @param {ReactReconcileTransaction} transaction * @private */ - _mountChildByNameAtIndex: function( + _mountChildAtIndex: function( child, - name, index, transaction, context) { var mountImage = ReactReconciler.mountComponent( child, - name, transaction, this, this._nativeContainerInfo, diff --git a/src/renderers/shared/reconciler/ReactReconciler.js b/src/renderers/shared/reconciler/ReactReconciler.js index 7b3f453e1aab7..795933f2d73a6 100644 --- a/src/renderers/shared/reconciler/ReactReconciler.js +++ b/src/renderers/shared/reconciler/ReactReconciler.js @@ -27,7 +27,6 @@ var ReactReconciler = { * Initializes the component, renders markup, and registers event listeners. * * @param {ReactComponent} internalInstance - * @param {string} rootID DOM ID of the root node. * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction * @param {?object} the containing native component instance * @param {?object} info about the native container @@ -37,14 +36,12 @@ var ReactReconciler = { */ mountComponent: function( internalInstance, - rootID, transaction, nativeParent, nativeContainerInfo, context ) { var markup = internalInstance.mountComponent( - rootID, transaction, nativeParent, nativeContainerInfo, diff --git a/src/test/ReactTestUtils.js b/src/test/ReactTestUtils.js index 464502638a962..b7c4cd5d931ba 100644 --- a/src/test/ReactTestUtils.js +++ b/src/test/ReactTestUtils.js @@ -11,7 +11,6 @@ 'use strict'; -var ClientReactRootIndex = require('ClientReactRootIndex'); var EventConstants = require('EventConstants'); var EventPluginHub = require('EventPluginHub'); var EventPluginRegistry = require('EventPluginRegistry'); @@ -22,7 +21,6 @@ var ReactDOMComponentTree = require('ReactDOMComponentTree'); var ReactElement = require('ReactElement'); var ReactBrowserEventEmitter = require('ReactBrowserEventEmitter'); var ReactCompositeComponent = require('ReactCompositeComponent'); -var ReactInstanceHandles = require('ReactInstanceHandles'); var ReactInstanceMap = require('ReactInstanceMap'); var ReactUpdates = require('ReactUpdates'); var SyntheticEvent = require('SyntheticEvent'); @@ -447,13 +445,10 @@ ReactShallowRenderer.prototype._render = function(element, transaction, context) if (this._instance) { this._instance.receiveComponent(element, transaction, context); } else { - var rootID = ReactInstanceHandles.createReactRootID( - ClientReactRootIndex.createReactRootIndex() - ); var instance = new ShallowComponentWrapper(element.type); instance.construct(element); - instance.mountComponent(rootID, transaction, null, null, context); + instance.mountComponent(transaction, null, null, context); this._instance = instance; }