UNPKG

948 BJavaScriptView Raw
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'use strict';
10
11var ReactDOM;
12
13function getReactDOM() {
14 if (!ReactDOM) {
15 // This is safe to use because current module only exists in the addons build:
16 var ReactWithAddonsUMDEntry = require('./ReactWithAddonsUMDEntry');
17 // This is injected by the ReactDOM UMD build:
18 ReactDOM = ReactWithAddonsUMDEntry.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
19 }
20 return ReactDOM;
21}
22
23exports.getReactDOM = getReactDOM;
24
25if (process.env.NODE_ENV !== 'production') {
26 exports.getReactPerf = function () {
27 return getReactDOM().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactPerf;
28 };
29
30 exports.getReactTestUtils = function () {
31 return getReactDOM().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactTestUtils;
32 };
33}
\No newline at end of file