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