diff --git a/packages/react-dom/src/ReactDOMSharedInternals.js b/packages/react-dom/src/ReactDOMSharedInternals.js index 0d11b81718917..ad603e83cb061 100644 --- a/packages/react-dom/src/ReactDOMSharedInternals.js +++ b/packages/react-dom/src/ReactDOMSharedInternals.js @@ -10,7 +10,9 @@ import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities'; import type {HostDispatcher} from './shared/ReactDOMTypes'; -import {NoEventPriority} from 'react-reconciler/src/ReactEventPriorities'; +// This should line up with NoEventPriority from react-reconciler/src/ReactEventPriorities +// but we can't depend on the react-reconciler from this isomorphic code. +export const NoEventPriority: EventPriority = (0: any); type ReactDOMInternals = { d /* ReactDOMCurrentDispatcher */: HostDispatcher, diff --git a/packages/react-server/src/ReactFlightServer.js b/packages/react-server/src/ReactFlightServer.js index 405401a8b3421..cb138fd30a710 100644 --- a/packages/react-server/src/ReactFlightServer.js +++ b/packages/react-server/src/ReactFlightServer.js @@ -118,9 +118,7 @@ import { objectName, } from 'shared/ReactSerializationErrors'; -import type {SharedStateServer} from 'react/src/ReactSharedInternalsServer'; -import ReactSharedInternalsImpl from 'shared/ReactSharedInternals'; -const ReactSharedInternals: SharedStateServer = (ReactSharedInternalsImpl: any); +import ReactSharedInternals from './ReactSharedInternalsServer'; import isArray from 'shared/isArray'; import getPrototypeOf from 'shared/getPrototypeOf'; import binaryToComparableString from 'shared/binaryToComparableString'; diff --git a/packages/react-server/src/ReactSharedInternalsServer.js b/packages/react-server/src/ReactSharedInternalsServer.js index 8ef67044feca1..efc3588a6452f 100644 --- a/packages/react-server/src/ReactSharedInternalsServer.js +++ b/packages/react-server/src/ReactSharedInternalsServer.js @@ -7,9 +7,11 @@ * @flow */ +import type {SharedStateServer} from 'react/src/ReactSharedInternalsServer'; + import * as React from 'react'; -const ReactSharedInternalsServer = +const ReactSharedInternalsServer: SharedStateServer = // $FlowFixMe: It's defined in the one we resolve to. React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;