Archive

#nextjs-course

26 notes match these filters

  • Next.js in Practice · Part 2617 min read

    TanStack Query - Server Prefetch and Hydration

    A complete, copy-pasteable TanStack Query v5 setup for the Next.js 16.4.3 App Router - per-request clients, server prefetch with streamed pending queries, HydrationBoundary, useSuspenseQuery, mutations that invalidate both caches, Cache Components, and the pitfalls.

  • Next.js in Practice · Part 1020 min read

    Errors, Redirects and Request Lifecycle APIs

    How Next.js 16 turns thrown errors into UI and status codes (error.tsx, catchError, notFound, forbidden, unauthorized, redirect) and how the request lifecycle APIs after, connection, cookies, headers, draftMode and instrumentation.ts work under the hood.

  • Next.js in Practice · Part 2721 min read

    Server-Aware Auth - Sessions, Proxy and the DAL

    A complete cookie-session auth build for Next.js 16, covering encrypted sessions with jose, login and logout Server Actions, an optimistic check in proxy.ts, a Data Access Layer with verifySession, authorization in actions and Route Handlers, unauthorized() and forbidden(), and the rules for auth under Cache Components.

  • Next.js in Practice · Part 0816 min read

    Route Handlers and Proxy

    How route.ts handlers are dispatched and when a GET is prerendered, and how proxy.ts (the renamed middleware) runs before routing, matches paths and talks to the router through response headers.