Skip to content

Commit 4356245

Browse files
authored
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.
1 parent 9123c47 commit 4356245

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/react-dom/src/client/ReactDOMFB.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,12 @@ Object.assign(
3939
},
4040
);
4141

42+
// TODO: These are temporary until we update the callers downstream.
43+
ReactDOM.unstable_createRoot = ReactDOM.createRoot;
44+
ReactDOM.unstable_createSyncRoot = ReactDOM.createSyncRoot;
45+
ReactDOM.unstable_interactiveUpdates = (fn, a, b, c) => {
46+
ReactDOM.unstable_flushDiscreteUpdates();
47+
return ReactDOM.unstable_discreteUpdates(fn, a, b, c);
48+
};
49+
4250
export default ReactDOM;

0 commit comments

Comments
 (0)