Skip to content

Commit

Permalink
Concurrent Rendering ✈
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaiyan-dev committed Jun 8, 2023
1 parent 187e5aa commit 987a92f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/docusaurus/src/client/clientEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ if (ExecutionEnvironment.canUseDOM) {

const renderApp = () => {
if (hydrate) {
ReactDOM.hydrateRoot(container, app, {
onRecoverableError,
React.startTransition(() => {
ReactDOM.hydrateRoot(container, app, {
onRecoverableError,
});
});
} else {
const root = ReactDOM.createRoot(container, {onRecoverableError});
root.render(app);
React.startTransition(() => {
root.render(app);
});
}
};

Expand Down

0 comments on commit 987a92f

Please sign in to comment.