Skip to content

Commit cc3999f

Browse files
authored
fix(solid-router): dev server hydration with pending component (#5585)
1 parent eab8a99 commit cc3999f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/solid-router/src/Match.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ export const Match = (props: { matchId: string }) => {
9696
<matchContext.Provider value={() => props.matchId}>
9797
<Dynamic
9898
component={ResolvedSuspenseBoundary()}
99-
fallback={<Dynamic component={PendingComponent()} />}
99+
fallback={
100+
// Don't show fallback on server when using no-ssr mode to avoid hydration mismatch
101+
router.isServer || resolvedNoSsr ? undefined : (
102+
<Dynamic component={PendingComponent()} />
103+
)
104+
}
100105
>
101106
<Dynamic
102107
component={ResolvedCatchBoundary()}

0 commit comments

Comments
 (0)