React源代码:"真正的内部依赖"是什么意思

时间:2017-09-10 22:25:30

标签: reactjs

我正在浏览反应源代码并注意到ReactDOMFiberFBEntry.js(https://github.com/facebook/react/blob/master/src/fb/ReactDOMFiberFBEntry.js)。

此文件具有以下注释:

 // These are real internal dependencies that are trickier to remove:

"真正的内部依赖"是什么意思?内部反应自己,React Dom?我确信这很明显,但我不太确定。这个词也是真实的"在这种情况下有多大意义?

源:

/**
 * Copyright 2013-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

'use strict';

var ReactDOMFiber = require('ReactDOMFiberEntry');

Object.assign(
  ReactDOMFiber.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
  {
    // These are real internal dependencies that are trickier to remove:
    ReactBrowserEventEmitter: require('ReactBrowserEventEmitter'),
    ReactErrorUtils: require('ReactErrorUtils'),
    ReactFiberErrorLogger: require('ReactFiberErrorLogger'),
    ReactFiberTreeReflection: require('ReactFiberTreeReflection'),
    ReactDOMComponentTree: require('ReactDOMComponentTree'),
    ReactInstanceMap: require('ReactInstanceMap'),
    // This is used for ajaxify on www:
    DOMProperty: require('DOMProperty'),
    // These are dependencies of TapEventPlugin:
    EventPluginUtils: require('EventPluginUtils'),
    EventPropagators: require('EventPropagators'),
    SyntheticUIEvent: require('SyntheticUIEvent'),
  },
);

module.exports = ReactDOMFiber;

0 个答案:

没有答案