Skip to content
Source
Sign inSign up
TanStack/router

fix(solid-router): dev server hydration with pending component #5585

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 1 commit intomain fromfix(solid-router)--dev-server-hydration-with-pending-componentmerged by birkskyum(GitHub profile, opens in a new tab)

Showing 1 changed file with 6 additions and 1 deletion.

x
0 of 1 viewed, 1 left
6 additions and 1 deletionpackages/solid-router/src/Match.tsxModified
View file
@@ -96,7 +96,12 @@
<matchContext.Provider value={() => props.matchId}>
<Dynamic
component={ResolvedSuspenseBoundary()}
- fallback={<Dynamic component={PendingComponent()} />}
+ fallback={
+ // Don't show fallback on server when using no-ssr mode to avoid hydration mismatch
+ router.isServer || resolvedNoSsr ? undefined : (
+ <Dynamic component={PendingComponent()} />
+ )
+ }
<Dynamic
component={ResolvedCatchBoundary()}