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