docs(react-query): fix undefined userId in dependent query prefetch example - #11504
changbaebang wants to merge 1 commit into
Conversation
…xample The server-side example in the SSR guide checked `user?.userId` and then referenced an undeclared `userId` variable. Align it with the client-side example above it (and the Preact guide) by using `user?.id` / `user.id`.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe SSR guide now uses ChangesSSR documentation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The SSR example now uses the user ID consistently and is safe to copy without the previous undefined reference. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
🎯 Changes
The server-side snippet in the React SSR guide's Prefetching dependent queries section checks
user?.userIdand then uses an undeclareduserIdinside the secondqueryClient.query(...)call, so the example throws aReferenceErrorwhen copied as-is.The client-side example directly above it (and the same section in the Preact SSR guide) already use
user?.id. This aligns the server-side snippet with them:user?.id/user.id.Docs-only, no code change.
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
idwhen fetching projects.