mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 12:20:38 +01:00
* Add current owner ref fallback for newer renderers with older react versions * Replaced current owner forward with current:null
23 lines
714 B
JavaScript
23 lines
714 B
JavaScript
/**
|
|
* 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.
|
|
*/
|
|
|
|
import 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,
|
|
};
|
|
}
|
|
|
|
export default ReactSharedInternals;
|