Skip to content

Commit a05cef4

Browse files
committed
Merge pull request #852 from spicyj/no-store-mount-image
Don't store mount image on component instance
2 parents 4f53f58 + 4d3a9c8 commit a05cef4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/core/ReactMultiChild.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ var ReactMultiChild = {
199199
transaction,
200200
this._mountDepth + 1
201201
);
202-
child._mountImage = mountImage;
203202
child._mountIndex = index;
204203
mountImages.push(mountImage);
205204
index++;
@@ -346,10 +345,11 @@ var ReactMultiChild = {
346345
* Creates a child component.
347346
*
348347
* @param {ReactComponent} child Component to create.
348+
* @param {string} mountImage Markup to insert.
349349
* @protected
350350
*/
351-
createChild: function(child) {
352-
enqueueMarkup(this._rootNodeID, child._mountImage, child._mountIndex);
351+
createChild: function(child, mountImage) {
352+
enqueueMarkup(this._rootNodeID, mountImage, child._mountIndex);
353353
},
354354

355355
/**
@@ -391,9 +391,8 @@ var ReactMultiChild = {
391391
transaction,
392392
this._mountDepth + 1
393393
);
394-
child._mountImage = mountImage;
395394
child._mountIndex = index;
396-
this.createChild(child);
395+
this.createChild(child, mountImage);
397396
this._renderedChildren = this._renderedChildren || {};
398397
this._renderedChildren[name] = child;
399398
},
@@ -411,7 +410,6 @@ var ReactMultiChild = {
411410
// TODO: When is this not true?
412411
if (ReactComponent.isValidComponent(child)) {
413412
this.removeChild(child);
414-
child._mountImage = null;
415413
child._mountIndex = null;
416414
child.unmountComponent();
417415
delete this._renderedChildren[name];

0 commit comments

Comments
 (0)