Skip to content

Commit

Permalink
Remove prefixed concurrent APIs from www build
Browse files Browse the repository at this point in the history
Instead we'll use the experimental builds when syncing to www.
  • Loading branch information
acdlite committed Oct 15, 2019
1 parent dca8802 commit 6114128
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/client/ReactDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ type RootOptions = {
},
};

export function createRoot(
function createRoot(
container: DOMContainer,
options?: RootOptions,
): _ReactRoot {
Expand All @@ -636,7 +636,7 @@ export function createRoot(
return new ReactRoot(container, options);
}

export function createSyncRoot(
function createSyncRoot(
container: DOMContainer,
options?: RootOptions,
): _ReactRoot {
Expand Down
28 changes: 1 addition & 27 deletions packages/react-dom/src/client/ReactDOMFB.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,9 @@ import {getIsHydrating} from 'react-reconciler/src/ReactFiberHydrationContext';
import {get as getInstance} from 'shared/ReactInstanceMap';
import {addUserTimingListener} from 'shared/ReactFeatureFlags';

import ReactDOM, {createRoot, createSyncRoot} from './ReactDOM';
import ReactDOM from './ReactDOM';
import {isEnabled} from '../events/ReactBrowserEventEmitter';
import {getClosestInstanceFromNode} from './ReactDOMComponentTree';
import {queueExplicitHydrationTarget} from '../events/ReactDOMEventReplaying';

import {
discreteUpdates,
flushDiscreteUpdates,
flushControlled,
} from 'react-reconciler/inline.dom';

// TODO remove this legacy method, unstable_discreteUpdates replaces it
ReactDOM.unstable_interactiveUpdates = (fn, a, b, c) => {
flushDiscreteUpdates();
return discreteUpdates(fn, a, b, c);
};

ReactDOM.unstable_discreteUpdates = discreteUpdates;
ReactDOM.unstable_flushDiscreteUpdates = flushDiscreteUpdates;
ReactDOM.unstable_flushControlled = flushControlled;

ReactDOM.unstable_createRoot = createRoot;
ReactDOM.unstable_createSyncRoot = createSyncRoot;

ReactDOM.unstable_scheduleHydration = target => {
if (target) {
queueExplicitHydrationTarget(target);
}
};

Object.assign(
(ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: any),
Expand Down

0 comments on commit 6114128

Please # to comment.