Skip to content

Commit

Permalink
fix: router compat5 make render deap loop (#12783)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinbao1001 authored Nov 14, 2024
1 parent b3db94e commit 8c2e2d8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/renderer-react/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,14 @@ function RemoteComponentReactRouter5(props: any) {
route,
routes: clientRoutes,
};
const Remote = () => (
<Component {...ComponentProps}>{props.hasChildren && <Outlet />}</Component>
);
return props.useStream ? (
<React.Suspense fallback={<props.loadingComponent />}>
<Remote />
<Component {...ComponentProps}>
{props.hasChildren && <Outlet />}
</Component>
</React.Suspense>
) : (
<Remote />
<Component {...ComponentProps}>{props.hasChildren && <Outlet />}</Component>
);
}

Expand Down

0 comments on commit 8c2e2d8

Please sign in to comment.