Files
Andrew ClarkandGitHub befa5fb082 Add experimental_gesturePush to App Router (#88776)
## Summary

This adds a new experimental router method `experimental_gesturePush`
that enables gesture-driven navigation. The feature is gated behind a
new `experimental.gestureTransition` config flag, which implicitly opts
the app into using the experimental React build.

It is _not_ suitable for production use yet; it's a proof-of-concept so
we can test the integration between the Next.js client router and
React's Gesture Transitions experiment. You can use it to build demos,
but it shouldn't be used in a real app.

It dispatches updates through React's useOptimistic hook instead of the
main router state queue, essentially forking the router state until the
gesture completes.

This should only be called inside `startGestureTransition`. It's a
low-level method that is not meant to be used in application code, only
in libraries that know how to properly integrate with both Next and
React.

## Test Plan

- E2E test that simulates a gesture by holding an async transition open
between button clicks
- Run: `pnpm testonly test/e2e/app-dir/gesture-transitions`
2026-01-20 00:35:10 -05:00

12 lines
174 B
JavaScript

/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
experimental: {
gestureTransition: true,
},
cacheComponents: true,
}
module.exports = nextConfig