1 | /**
|
2 | * Copyright (c) 2013-present, Facebook, Inc.
|
3 | *
|
4 | * This source code is licensed under the MIT license found in the
|
5 | * LICENSE file in the root directory of this source tree.
|
6 | *
|
7 | *
|
8 | */
|
9 |
|
10 | ;
|
11 |
|
12 | var _require = require('./ReactFiber'),
|
13 | createHostContainerFiber = _require.createHostContainerFiber;
|
14 |
|
15 | exports.createFiberRoot = function (containerInfo) {
|
16 | // Cyclic construction. This cheats the type system right now because
|
17 | // stateNode is any.
|
18 | var uninitializedFiber = createHostContainerFiber();
|
19 | var root = {
|
20 | current: uninitializedFiber,
|
21 | containerInfo: containerInfo,
|
22 | isScheduled: false,
|
23 | nextScheduledRoot: null
|
24 | };
|
25 | uninitializedFiber.stateNode = root;
|
26 | return root;
|
27 | }; |
\ | No newline at end of file |