Skip to content

Conversation

@cademis
Copy link
Contributor

@cademis cademis commented Aug 23, 2025

🎯 Changes

What changes are made in this PR? Is it a feature or a bug fix?

Typo fix

✅ Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

Summary by CodeRabbit

  • Documentation
    • Corrected React Query usage example to use staleTime instead of the misspelled stateTime.
    • Clarified option naming to align with current React Query API, reducing confusion for users following the guide.
    • Reviewed and updated the snippet to ensure accuracy without altering any product behavior or APIs.

@cademis cademis requested a review from a team as a code owner August 23, 2025 20:54
@vercel
Copy link

vercel bot commented Aug 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
www Ready Ready Preview Comment Aug 23, 2025 8:56pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 23, 2025

Walkthrough

Documentation update: corrected a code snippet in www/docs/client/tanstack-react-query/usage.mdx to use the React Query option key staleTime instead of stateTime. No code or API changes.

Changes

Cohort / File(s) Summary
Docs: React Query usage
www/docs/client/tanstack-react-query/usage.mdx
Fix option name in example from stateTime to staleTime in documentation snippet.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I twitch my whiskers, hop with glee,
A typo fixed—so clean, so free!
From state to stale, the time’s now right,
Queries rest in proper light.
Carrot raised to docs that shine,
Ship it swift—commit divine! 🥕✨

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

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.

❤️ Share
🪧 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.

@vercel
Copy link

vercel bot commented Aug 23, 2025

@cademis is attempting to deploy a commit to the trpc Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@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 (4)
www/docs/client/tanstack-react-query/usage.mdx (4)

28-28: Standardize brand capitalization to “TanStack”.

Multiple instances use “Tanstack”. Consider normalizing to “TanStack” for brand consistency.

Apply this diff:

-... with Tanstack React Query.
+... with TanStack React Query.
...
-Provides a type-safe wrapper around [Tanstack's `queryOptions` function]...
+Provides a type-safe wrapper around [TanStack's `queryOptions` function]...
...
-    // Any Tanstack React Query options
+    // Any TanStack React Query options
...
-Provides a type-safe wrapper around [Tanstack's `infiniteQueryOptions` function]...
+Provides a type-safe wrapper around [TanStack's `infiniteQueryOptions` function]...
...
-Since Tanstack React Query uses fuzzy matching for query keys, you can also...
+Since TanStack React Query uses fuzzy matching for query keys, you can also...
...
-  // Any Tanstack React Query filter
+  // Any TanStack React Query filter
...
-  // Any Tanstack React Query filter
+  // Any TanStack React Query filter

Also applies to: 64-64, 72-72, 120-120, 142-142, 164-164, 176-176


46-48: Fix grammar: “used to manipulated” → “used to manipulate”.

Minor readability tweak.

-  // Create a QueryKey which can be used to manipulated many methods
+  // Create a QueryKey that can be used to manipulate many methods
   // on TanStack's QueryClient in a type-safe manner

187-189: Typo: “identify function” → “identity function”.

These are identity-style helpers that return the options while preserving types.

-Available for all mutation procedures. Provides a type-safe identify function for constructing options that can be passed to `useMutation`.
+Available for all mutation procedures. Provides a type-safe identity function for constructing options that can be passed to `useMutation`.
-Available for all subscription procedures. Provides a type-safe identify function for constructing options that can be passed to `useSubscription`.
+Available for all subscription procedures. Provides a type-safe identity function for constructing options that can be passed to `useSubscription`.

Also applies to: 208-210


239-241: Wording: “lastly received” → “most recently received”.

Slight polish for natural phrasing.

-  subscription.data; // The lastly received data
-  subscription.error; // The lastly received error
+  subscription.data; // The most recently received data
+  subscription.error; // The most recently received error
📜 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 e6fc309 and e1e3362.

📒 Files selected for processing (1)
  • www/docs/client/tanstack-react-query/usage.mdx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: E2E-tests (minimal-react)
  • GitHub Check: E2E-tests (vercel-edge-runtime)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: E2E-tests (soa)
  • GitHub Check: E2E-tests (next-minimal-starter)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: typecheck
  • GitHub Check: test
  • GitHub Check: Lint and auto-fix
  • GitHub Check: Analyze (typescript)
🔇 Additional comments (1)
www/docs/client/tanstack-react-query/usage.mdx (1)

72-74: Correct option key: stateTime → staleTime (confirmed).

Nice catch. This aligns with TanStack React Query’s option naming and fixes a confusing typo in the docs.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 23, 2025

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/trpc/trpc/@trpc/client@6908

@trpc/next

npm i https://pkg.pr.new/trpc/trpc/@trpc/next@6908

@trpc/react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/react-query@6908

@trpc/server

npm i https://pkg.pr.new/trpc/trpc/@trpc/server@6908

@trpc/tanstack-react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/tanstack-react-query@6908

@trpc/upgrade

npm i https://pkg.pr.new/trpc/trpc/@trpc/upgrade@6908

commit: e1e3362

@cademis cademis marked this pull request as draft August 23, 2025 21:01
@cademis cademis changed the title Correct typo in usage.mdx docs: Correct typo in usage.mdx Aug 23, 2025
@cademis cademis marked this pull request as ready for review August 23, 2025 21:08
@KATT KATT merged commit 177c503 into trpc:main Sep 5, 2025
42 of 46 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2025

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants