Workbench

TanStack Query

Patterns from three production Next.js builds that use TanStack Query v5, from server rendering to CMS dashboards to a storefront.

I've used TanStack Query v5 on three Next.js projects at Plex Bit Infosystems. Each one pushed it in a different direction, so these notes are grouped by problem, not by project. Every page says which project it comes from.

ProjectMy partWhat it taught me
Resort website (Jun–Aug 2026)The public website for a resort and the admin dashboard that manages itServer prefetching and hydration for a public site, per-section loading and error states, and retry rules
Company website and CMS (Aug–Sep 2026)The new company website with a teammate, and all of the CMS dashboard behind itMutations and data tables at scale across dozens of CMS sections, fetchQuery on the server, and one bulk query for the home page
Multi-vendor e-commerce platform (Apr–Jun 2026)Account and order pages, product search, blog, brand and sale pages, as one of several developersWhat the user sees while they wait: search, pagination, infinite lists and optimistic updates

The idea that ties them together

Every pattern here is a decision about where data lives and what the user sees while it loads. TanStack Query already has an option for each case; the work is picking the right one per screen and keeping each piece of data in one place.

Setting it up

Server-rendered sites

Dashboards and forms

Storefront UX

The e-commerce patterns also have longer write-ups on my blog: Making an e-commerce site feel fast with TanStack Query and Three things React Query taught me on a team e-commerce build.

Last updated on

On this page