Shipped/New Next.js App Router SDK is GA

June 19, 2026

New Next.js App Router SDK is GA
New Next.js App Router SDK is GA

@uniformdev/next-app-router is Uniform's latest SDK now in General Availability (version 20.67.0 and up).

We built it to unlock the full power of Next.js 16 App Router with full cacheComponents support. It enables flicker-free personalization and experimentation with static-like performance while remaining fully dynamic. This is a ground-up rewrite of our Next.js integration around React Server Components, edge middleware, and the Next.js 16 caching model. If you use App Router and care about TTFB, hydration cost, and eliminating personalization flicker, this is the version to use.

This SDK was in Early Access for the past 12 months and has been proven across dozens of high-traffic sites for ambitious digital teams.

Requirements

  • Next.js 16+ (App Router only)
  • Node.js 22+

Highlights

  • Server Components by default. Every Uniform component renders as an RSC. No client runtime is shipped for content rendering. Add "use client" only where you need browser APIs or interactivity, such as quirks, scores, or context updates, and push those leaves as far down the tree as possible.
  • Personalization and A/B tests resolved at the edge before first paint. Middleware resolves the route and evaluates personalization rules and tests at the edge, then rewrites to the page handler with the winning variant baked into the serialized page state. Visitors get the correct variant on first paint with no client-side swap, no layout shift, no flicker, and no JavaScript required for variant selection.
  • First-class cacheComponents support (Next.js 16). Import resolveRouteFromCode from @uniformdev/next-app-router/cache and route resolution is wrapped in 'use cache'. Repeat requests for the same page state are served from the framework cache with no round trip to the Uniform API, delivering static-like response times for dynamic content. Only the import path changes. The page component stays the same. Learn more how to enable it here.
  • Automatic, tag-based cache invalidation. The SDK integrates with Next.js cache tags, so publishing in Uniform invalidates only affected cached pages, not the whole site.
  • Per-component Suspense and streaming. Opt any component into a Suspense boundary directly from resolveComponent. The shell renders immediately and slower data-fetching components stream in.
  • Edge middleware that handles routing. One required middleware.ts handles route resolution, personalization evaluation, locale handling, custom route mapping (findRouteMatch), dynamic inputs via keys, content releases, and consent, all before the page component runs.
  • Vercel geo-IP quirks with zero config. On Vercel, x-vercel-ip-country, -region, and -city are auto-mapped to vc-country, vc-region, and vc-city quirks and are immediately usable in personalization rules.
  • No manifest pulling. The manifest is fetched at runtime with no local file to bundle, commit, or keep in sync. You can optionally use the uniform context manifest publish script if you sync definitions from the CLI.
  • Modern Next.js config wrapper. Wrap your config with withUniformConfig. It auto-detects uniform.server.config.ts and sets up Turbopack and Webpack aliases. Server config covers consent defaults, middleware runtime cache with SWR behavior, quirk serialization, and dev tools.

Also in this SDK

  • precomputeComposition resolves tests and personalizations server-side for fully static output, with per-test and per-personalization filters.
  • Composition cache (createCompositionCache) provides server-side access to full ComponentInstance data so you can read page metadata or inspect entire slots, not just render them.
  • Server-only clients: getCanvasClient, getRouteClient, getManifestClient, and getProjectMapClient (import 'server-only').
  • Typed component contract via ComponentProps<TParameters, TSlotNames>, with UniformText, UniformRichText, and UniformSlot, including render-prop and direct-iteration APIs.
  • Adapter compatibility mode (/compat) for a flattened props API if you are migrating from an older SDK.

Upgrading

Get started

Run Uniform CLI new and select Next.js App Router as a starting point:

npx @uniformdev/cli@latest new

Or add it to an existing app and point your preferred AI dev tool to this rules file.

npm install @uniformdev/next-app-router@latest

Read the updated SDK documentation here.

To get started, clone the lean SDK starter here, or start with the latest Uniform Component Starter for a more complete option with dozens of components and implementation best practices.

Updated AI rules

  • To add this SDK to an existing Next.js 16 App Router codebase, point your preferred AI dev tool to this rules file.
  • Get the latest AI rules with npx @uniformdev/cli@latest ai rules install (more on this here).
FeaturesImprovements