Skip to content

Remove concurrent apis from stable #17088

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

Merged
merged 5 commits into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove prefixed concurrent APIs from www build
Instead we'll use the experimental builds when syncing to www.
  • Loading branch information
acdlite committed Oct 15, 2019
commit 6114128157795f068640d1502f9d0a36bd3936e6
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