/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
v16.13.1
packages/shared/ReactSharedInternals.js
29 строк
880 B
Sebastian Markbåge
Export React as Named Exports instead of CommonJS (#18106)
26 фев 2020, 00:54
Не верифицирован
26 фев 2020, 00:54
60016c4
Код
Авторство
О чём код?
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import * as React from 'react'; const ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. // Current owner and dispatcher used to share the same ref, // but PR #14548 split them out to better support the react-debug-tools package. if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { ReactSharedInternals.ReactCurrentDispatcher = { current: null, }; } if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { ReactSharedInternals.ReactCurrentBatchConfig = { suspense: null, }; } export default ReactSharedInternals;