Skip to content

Conversation

wo-o29
Copy link

@wo-o29 wo-o29 commented Aug 26, 2025

Summary

This PR removes an unnecessary trailing comma

Before

- `options: HydrateOptions`
  - Optional
  - `defaultOptions: QueryOptions`
    - The default query options to use for the hydrated queries.
  - `queryClient?: QueryClient`,
    - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.

After

- `state: DehydratedState`
  - The state to hydrate
- `options: HydrateOptions`
  - Optional
  - `defaultOptions: QueryOptions`
    - The default query options to use for the hydrated queries.
  - `queryClient?: QueryClient` // remove comma
    - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.

Why

  • The trailing comma was a typo and inconsistent with other option notations.
  • Aligns the style with the rest of the documentation.

Applied Area

  • hydration.md
  • useIsFetching.md
  • useIsMutating.md
  • useMutation.md
  • useQuery.md
  • useQueryClient.md

Summary by CodeRabbit

  • Documentation
    • Standardized formatting across React Query hydration and hooks references by removing trailing commas from the queryClient option.
    • Ensures consistent presentation in Options/Parameters sections for hydrate, HydrationBoundary, useIsFetching, useIsMutating, useMutation, useMutationState, useQuery, and useQueryClient.
    • Improves readability without altering examples, behavior, or APIs.
    • No functional or public API changes.

Copy link

coderabbitai bot commented Aug 26, 2025

Walkthrough

Documentation updates remove trailing commas after the queryClient option in multiple React reference pages. No code, API, behavior, or control flow changes.

Changes

Cohort / File(s) Summary
React docs: queryClient punctuation cleanup
docs/framework/react/reference/hydration.md, docs/framework/react/reference/useIsFetching.md, docs/framework/react/reference/useIsMutating.md, docs/framework/react/reference/useMutation.md, docs/framework/react/reference/useMutationState.md, docs/framework/react/reference/useQuery.md, docs/framework/react/reference/useQueryClient.md
Removed trailing commas after the queryClient?: QueryClient line in options/parameters examples; formatting-only edits across docs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I nibble commas, hop with glee,
A tidy docs burrow for all to see.
QueryClient stands crisp and clear—
No trailing tails lingering here.
Thump-thump! My edits light and spry,
Docs now sparkle—carrot-high! 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 26, 2025
Copy link

@coderabbitai coderabbitai bot left a 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 (7)
docs/framework/react/reference/useIsMutating.md (1)

20-20: Tighten phrasing: “Use this to use …”

Consider a crisper sentence to avoid repetition.

-  - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
+  - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.
docs/framework/react/reference/useQuery.md (2)

182-182: Minor copy edit for clarity

Same nit as elsewhere: reduce “use … use” repetition.

-  - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
+  - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.

94-101: Optional: fix small type/formatting nits in the options list

Not part of this PR, but since we’re touching this section, a few minor TS formatting fixes would improve readability:

-- `staleTime: number | 'static' ((query: Query) => number | 'static')`
+- `staleTime: number | 'static' | ((query: Query) => number | 'static')`

-`placeholderData: TData | (previousValue: TData | undefined; previousQuery: Query | undefined,) => TData`
+`placeholderData: TData | ((previousValue: TData | undefined, previousQuery: Query | undefined) => TData)`

-`structuralSharing: boolean | (oldData: unknown | undefined, newData: unknown) => unknown)`
+`structuralSharing: boolean | ((oldData: unknown | undefined, newData: unknown) => unknown)`

Rationale:

  • Add the missing union pipe for staleTime.
  • Use a comma between function parameters (not a semicolon) and remove the stray trailing comma.
  • Balance parentheses in structuralSharing and wrap the function type for clarity.

Also applies to: 157-163

docs/framework/react/reference/useMutationState.md (1)

76-76: Copy tweak for consistency

Mirror the same phrasing used in the other pages.

-  - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
+  - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.
docs/framework/react/reference/useMutation.md (1)

107-107: Minor copy edit

Align wording with other pages.

-  - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
+  - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.
docs/framework/react/reference/useQueryClient.md (2)

17-17: Copy tighten for consistency

Same micro-edit as elsewhere.

-  - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
+  - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.

9-12: Example call reads like a signature

The example shows useQueryClient(queryClient?: QueryClient) inside a call site, which looks like a TS signature rather than a real invocation. Consider showing a normal call and (optionally) a commented variant passing a client.

-import { useQueryClient } from '@tanstack/react-query'
-
-const queryClient = useQueryClient(queryClient?: QueryClient)
+import { useQueryClient } from '@tanstack/react-query'
+
+const queryClient = useQueryClient()
+// Optionally pass a custom client:
+// const queryClient = useQueryClient(myQueryClient)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a1b1279 and ba76583.

📒 Files selected for processing (7)
  • docs/framework/react/reference/hydration.md (2 hunks)
  • docs/framework/react/reference/useIsFetching.md (1 hunks)
  • docs/framework/react/reference/useIsMutating.md (1 hunks)
  • docs/framework/react/reference/useMutation.md (1 hunks)
  • docs/framework/react/reference/useMutationState.md (1 hunks)
  • docs/framework/react/reference/useQuery.md (1 hunks)
  • docs/framework/react/reference/useQueryClient.md (1 hunks)
🔇 Additional comments (10)
docs/framework/react/reference/useIsMutating.md (2)

19-19: Trailing comma removal aligns with docs style.

Good catch. This matches the formatting used elsewhere and avoids implying more properties follow.


19-20: All clear—no remaining trailing commas
I’ve scanned the entire docs/ directory for any occurrences of a bullet line like

- `queryClient?: QueryClient`,

and found none. There are no other pages requiring this change.

docs/framework/react/reference/useQuery.md (1)

181-181: Consistent punctuation: trailing comma removed.

Looks good and consistent with neighboring docs.

docs/framework/react/reference/useMutationState.md (1)

75-75: Trailing comma removal is correct

Matches the intended bullet style and avoids suggesting additional fields.

docs/framework/react/reference/useMutation.md (1)

106-106: Trailing comma removed — consistent with style

All good here.

docs/framework/react/reference/useQueryClient.md (1)

16-16: Trailing comma removal looks good

Keeps the bullets tidy and consistent.

docs/framework/react/reference/useIsFetching.md (2)

19-20: Trailing comma removal is correct and improves consistency.

The bullet now mirrors the house style used elsewhere in the docs; no API/behavior implications. Nice cleanup.


16-21: No trailing commas after QueryClient found — all clear

I ran the suggested ripgrep patterns across the docs/ directory and confirmed there are no instances of `QueryClient`, or queryClient?: QueryClient,. No further changes are needed.

docs/framework/react/reference/hydration.md (2)

94-96: Removed trailing comma after queryClient?: QueryClient — looks good.

Matches the updated style and avoids mixed punctuation in lists.


125-126: Consistent comma removal in HydrationBoundary options.

Keeps the options list tidy and aligned with other pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant