AcademyRulesDevelopment

Next.js and TanStack Query rules, compact version

Development teams that want Cursor to apply server prefetching and client-side queries consistently in a Next.js app.

  • Recommendedour rating
  • 40,892repository stars
  • CC0-1.0licence
  • 4 months agolast update
mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/nextjs-tanstack-query.mdc -o .cursor/rules/nextjs-tanstack-query-2.mdc
nextjs-tanstack-query-2.mdc

Loading the file...

What it does

A second, more compact Cursor rules file for Next.js App Router with TanStack Query v5. It covers the split between server and client components, a provider setup, and the server prefetch pattern with HydrationBoundary so client components read from an already filled cache.

Use cases

  1. 01Prefetch a list on the server and hydrate it
  2. 02Read prefetched data with useQuery in a client component
  3. 03Add optimistic updates to a mutation

Questions about
Next.js and TanStack Query rules, compact version.

What is Next.js and TanStack Query rules, compact version used for?

Development teams that want Cursor to apply server prefetching and client-side queries consistently in a Next.js app. A second, more compact Cursor rules file for Next.js App Router with TanStack Query v5. It covers the split between server and client components, a provider setup, and the server prefetch pattern with HydrationBoundary so client components read from an already filled cache.

How do I install Next.js and TanStack Query rules, compact version?

Run this in your terminal: mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/nextjs-tanstack-query.mdc -o .cursor/rules/nextjs-tanstack-query-2.mdc

Is Next.js and TanStack Query rules, compact version open source?

Yes. The code is on GitHub (PatrickJS/awesome-cursorrules) under the CC0-1.0 licence.

Is Next.js and TanStack Query rules, compact version safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.