From 43562455c992cfc614f4301473443e1360baf7b5 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 15 Oct 2019 16:44:33 -0700 Subject: [PATCH] Temporary patch www fork with prefixed APIs (#17103) I'm doing this here instead of in the downstream repo so that if the sync diff gets reverted, it doesn't revert this, too. Once the sync has landed, and the callers are updated in www, I will remove this. --- packages/react-dom/src/client/ReactDOMFB.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/react-dom/src/client/ReactDOMFB.js b/packages/react-dom/src/client/ReactDOMFB.js index 83353421e4ae..f90a569b982a 100644 --- a/packages/react-dom/src/client/ReactDOMFB.js +++ b/packages/react-dom/src/client/ReactDOMFB.js @@ -39,4 +39,12 @@ Object.assign( }, ); +// TODO: These are temporary until we update the callers downstream. +ReactDOM.unstable_createRoot = ReactDOM.createRoot; +ReactDOM.unstable_createSyncRoot = ReactDOM.createSyncRoot; +ReactDOM.unstable_interactiveUpdates = (fn, a, b, c) => { + ReactDOM.unstable_flushDiscreteUpdates(); + return ReactDOM.unstable_discreteUpdates(fn, a, b, c); +}; + export default ReactDOM;