Repro: Hydration mismatch error with TanStack Start + streaming + Material UI + Emotion #5490
+71
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
I'm trying to follow this pattern (https://tanstack.com/router/latest/docs/integrations/query) to automate SSR dehydration/hydration and streaming between TanStack Router and TanStack Query in a TanStack Start app. When doing so with components that use MUI with Emotion, the streaming of queries causes a hydration mismatch error when
useSuspenseQueryun-suspends.Minimal Repro
This branch updates the existing TanStack Start + Material UI example to also use the query streaming pattern linked above.
examples/react/start-material-ui/pnpm installpnpm devexamples/react/start-material-ui/src/routes/about.tsxfile, changeisStreamingto false.