1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | 'use strict';
|
10 |
|
11 | var _assign = require('object-assign');
|
12 |
|
13 | var ReactReconciler = require('./ReactReconciler');
|
14 |
|
15 | var ReactSimpleEmptyComponent = function (placeholderElement, instantiate) {
|
16 | this._currentElement = null;
|
17 | this._renderedComponent = instantiate(placeholderElement);
|
18 | };
|
19 | _assign(ReactSimpleEmptyComponent.prototype, {
|
20 | mountComponent: function (transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
|
21 | {
|
22 | return ReactReconciler.mountComponent(this._renderedComponent, transaction, hostParent, hostContainerInfo, context, parentDebugID);
|
23 | },
|
24 | receiveComponent: function () {},
|
25 | getHostNode: function () {
|
26 | return ReactReconciler.getHostNode(this._renderedComponent);
|
27 | },
|
28 | unmountComponent: function () {
|
29 | ReactReconciler.unmountComponent(this._renderedComponent);
|
30 | this._renderedComponent = null;
|
31 | }
|
32 | });
|
33 |
|
34 | module.exports = ReactSimpleEmptyComponent; |
\ | No newline at end of file |