Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plumbing of isomorphic code #29967

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/react-dom/src/ReactDOMSharedInternals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 3 additions & 1 deletion packages/react-server/src/ReactSharedInternalsServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down