docs(preact-query): trim 'queryOptions'/'infiniteQueryOptions' examples to what the factory needs to prove - #11336
Conversation
…es to what the factory itself needs to prove
|
View your CI Pipeline Execution ↗ for commit 487f7c4
☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change updates Preact ChangesPreact query options documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change narrows Preact Query examples and updates the generated references without changing published runtime behavior, so no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
🎯 Changes
queryOptions.ts's "parameterized factory" example andinfiniteQueryOptions.ts's equivalent both appended aqueryClient.query(...)/queryClient.infiniteQuery(...)call after the consuming component, introduced by a// see useQuery/useInfiniteQuery for an example that warms the cache this waycomment pointing at the hover-prefetch example those two files already carry. Since the hook files (useQuery.ts,useInfiniteQuery.ts) already demonstrate that imperative-call scenario in depth, repeating a truncated version of it here duplicated the pointer without adding anything the reader couldn't get from following it. Removed the trailing imperative-call lines and the now-unusednoopimport, and reworded the example's caption to describe what it actually shows (reusing the options object perid/postId), since the old caption ("reused across a hook and an imperative call") no longer matched.queryOptions.tsalso had a second example ("The same options object works with every API that accepts query options") that, once its own trailingqueryClient.query(...)/getQueryData(...)calls are held to the same standard, becomes functionally identical to the first example — same shape, same point, no unique behavior of its own. Removed it entirely rather than trim it down to a near-duplicate of the first.infiniteQueryOptions.tshad no equivalent second example, so nothing else changed there.mutationOptions.tsalready keeps both its examples fully self-contained inside their consuming component — no changes needed.Regenerated the corresponding reference docs with
pnpm run generate-docs.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
queryOptionsandinfiniteQueryOptionsexamples to focus on reusable, parameterized option factories.