Skip to content

Commit 987a92f

Browse files
Concurrent Rendering ✈
1 parent 187e5aa commit 987a92f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

packages/docusaurus/src/client/clientEntry.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ if (ExecutionEnvironment.canUseDOM) {
4343

4444
const renderApp = () => {
4545
if (hydrate) {
46-
ReactDOM.hydrateRoot(container, app, {
47-
onRecoverableError,
46+
React.startTransition(() => {
47+
ReactDOM.hydrateRoot(container, app, {
48+
onRecoverableError,
49+
});
4850
});
4951
} else {
5052
const root = ReactDOM.createRoot(container, {onRecoverableError});
51-
root.render(app);
53+
React.startTransition(() => {
54+
root.render(app);
55+
});
5256
}
5357
};
5458

0 commit comments

Comments
 (0)