-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
docs: Document possible conflict between PersistQueryClientProvider and SSR streaming
#9979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughDocumentation sections were added to the React advanced SSR guide explaining how to configure the persist adapter for streaming scenarios. The guidance instructs on limiting query persistence to settled queries to avoid serializing pending promises during Server Component streaming. Code examples demonstrate usage of Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/framework/react/guides/advanced-ssr.md (1)
535-552: Add import statement to the code example for completeness.The example uses
defaultShouldDehydrateQuerywithout showing its import. While earlier examples in the guide demonstrate this import from@tanstack/react-query, it would be clearer to include it in this standalone section for readers who may jump directly to this part.// Add the import at the top of the example: import { PersistQueryClientProvider, defaultShouldDehydrateQuery, } from '@tanstack/react-query'Otherwise, the documentation accurately addresses the conflict between pending query dehydration and persistence storage, and the solution is correct.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/framework/react/guides/advanced-ssr.md(1 hunks)
🔇 Additional comments (1)
docs/framework/react/guides/advanced-ssr.md (1)
535-552: Verify whether this section is duplicated elsewhere in the PR.The AI-generated summary mentions "The changes duplicate the section in two locations," but only one instance of "Using the Persist Adapter with Streaming" is visible in the provided code. Please confirm whether this section appears in multiple places or if the summary is inaccurate.
Ayo1984
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
light work
🎯 Changes
Currently, using both
PersistQueryClientProviderand query streaming in NextJS can cause exceptions during dehydration with the current example in the docs.This PR documents the conflict and the prop you may use to solve it.
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.